Update invoice data report references in command and scheduling logic

This commit is contained in:
dhanabalan
2025-11-02 16:51:40 +05:30
parent 1cb54f5101
commit 92bcbc0e8d
4 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ class SendInvoiceDataReport extends Command
// Fetch mail rules based on schedule type // Fetch mail rules based on schedule type
$mailRules = \App\Models\AlertMailRule::where('module', 'InvoiceValidation') $mailRules = \App\Models\AlertMailRule::where('module', 'InvoiceDataReport')
->where('rule_name', 'InvoiceDataMail') ->where('rule_name', 'InvoiceDataMail')
->where('schedule_type', $scheduleType) ->where('schedule_type', $scheduleType)
->where('plant', $plantId) ->where('plant', $plantId)

View File

@@ -48,6 +48,7 @@ class AlertMailRuleResource extends Resource
->required() ->required()
->options([ ->options([
'InvoiceValidation' => 'InvoiceValidation', 'InvoiceValidation' => 'InvoiceValidation',
'InvoiceDataReport' => 'InvoiceDataReport',
'ProductionQuantities' => 'ProductionQuantities', 'ProductionQuantities' => 'ProductionQuantities',
//'Calibration' => 'Calibration', //'Calibration' => 'Calibration',
]), ]),

View File

@@ -32,7 +32,7 @@ class InvoiceDataMail extends Mailable
public function envelope(): Envelope public function envelope(): Envelope
{ {
return new Envelope( return new Envelope(
subject: 'Invoice Data Mail', subject: 'Invoice Data Report',
); );
} }

View File

@@ -73,8 +73,7 @@ Artisan::command('inspire', function () {
} }
//Invoice Data report scheduling //Invoice Data report scheduling
$invoiceDataRules = AlertMailRule::where('module', 'InvoiceValidation') $invoiceDataRules = AlertMailRule::where('module', 'InvoiceDataReport')
->where('rule_name', 'InvoiceDataMail')
->select('plant', 'schedule_type') ->select('plant', 'schedule_type')
->distinct() ->distinct()
->get(); ->get();