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
|
// 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)
|
||||||
|
|||||||
@@ -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',
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -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',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user