Update invoice data report references in command and scheduling logic
This commit is contained in:
@@ -37,7 +37,7 @@ class SendInvoiceDataReport extends Command
|
||||
|
||||
|
||||
// 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('schedule_type', $scheduleType)
|
||||
->where('plant', $plantId)
|
||||
|
||||
@@ -48,6 +48,7 @@ class AlertMailRuleResource extends Resource
|
||||
->required()
|
||||
->options([
|
||||
'InvoiceValidation' => 'InvoiceValidation',
|
||||
'InvoiceDataReport' => 'InvoiceDataReport',
|
||||
'ProductionQuantities' => 'ProductionQuantities',
|
||||
//'Calibration' => 'Calibration',
|
||||
]),
|
||||
|
||||
@@ -32,7 +32,7 @@ class InvoiceDataMail extends Mailable
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
return new Envelope(
|
||||
subject: 'Invoice Data Mail',
|
||||
subject: 'Invoice Data Report',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -73,8 +73,7 @@ Artisan::command('inspire', function () {
|
||||
}
|
||||
|
||||
//Invoice Data report scheduling
|
||||
$invoiceDataRules = AlertMailRule::where('module', 'InvoiceValidation')
|
||||
->where('rule_name', 'InvoiceDataMail')
|
||||
$invoiceDataRules = AlertMailRule::where('module', 'InvoiceDataReport')
|
||||
->select('plant', 'schedule_type')
|
||||
->distinct()
|
||||
->get();
|
||||
|
||||
Reference in New Issue
Block a user