Added unique constraint fro invoice mail report

This commit is contained in:
dhanabalan
2025-07-12 14:35:29 +05:30
parent aaa93e740b
commit c6f61fa19a

View File

@@ -44,7 +44,10 @@ Artisan::command('inspire', function () {
} }
//Invoice report scheduling //Invoice report scheduling
$invoiceRules = AlertMailRule::where('module', 'InvoiceValidation')->get(); $invoiceRules = AlertMailRule::where('module', 'InvoiceValidation')
->select('plant', 'schedule_type')
->distinct()
->get();
foreach ($invoiceRules as $rule) { foreach ($invoiceRules as $rule) {
$type = $rule->schedule_type; $type = $rule->schedule_type;