Merge pull request 'Added logic for if record not exist no mail get trigger in send invoice data report page' (#434) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #434
This commit was merged in pull request #434.
This commit is contained in:
@@ -176,7 +176,7 @@ class Scheduler extends Command
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'Daily':
|
case 'Daily':
|
||||||
if (now()->format('H:i') == '08:00') {
|
if (now()->format('H:i') == '11:30') {
|
||||||
\Artisan::call('send:invoice-data-report', [
|
\Artisan::call('send:invoice-data-report', [
|
||||||
'schedule_type' => $rule->schedule_type,
|
'schedule_type' => $rule->schedule_type,
|
||||||
'plant' => $rule->plant,
|
'plant' => $rule->plant,
|
||||||
|
|||||||
@@ -49,6 +49,13 @@ class SendInvoiceDataReport extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$todayRecordExists = InvoiceDataValidation::whereDate('created_at', now()->toDateString())->first();
|
||||||
|
|
||||||
|
if (!$todayRecordExists) {
|
||||||
|
$this->info('No records created today. Mail not sent.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if (strtolower($scheduleType) == 'daily') {
|
// if (strtolower($scheduleType) == 'daily') {
|
||||||
// $startDate = now()->subDay()->setTime(10, 0, 0);//8:00
|
// $startDate = now()->subDay()->setTime(10, 0, 0);//8:00
|
||||||
// $endDate = now()->setTime(10, 0, 0);//8
|
// $endDate = now()->setTime(10, 0, 0);//8
|
||||||
|
|||||||
Reference in New Issue
Block a user