Added logic to prevent empty mails for invoice report
Some checks are pending
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Waiting to run
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Some checks are pending
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Waiting to run
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user