Merge pull request 'Added logic to prevent empty mails for invoice report' (#627) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

Reviewed-on: #627
This commit was merged in pull request #627.
This commit is contained in:
2026-05-20 11:38:44 +00:00

View File

@@ -352,6 +352,16 @@ class SendInvoiceReport extends Command
->toArray();
}
// Prevent empty mails
if (
empty($filteredSerialData) &&
empty($filteredMaterialData) &&
empty($filteredBundleData)
) {
$this->warn("Skipping empty mail for rule {$rule->id}");
continue;
}
\Mail::to($toEmails)
->cc($ccEmails)
->send(new test(