1
0
forked from poc/pds

Added logic to prevent empty mails for invoice report

This commit is contained in:
dhanabalan
2026-05-20 17:08:30 +05:30
parent 561e0b448f
commit 017f57878d

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(