diff --git a/routes/console.php b/routes/console.php index 7f7dc22a3..f15f36e9a 100644 --- a/routes/console.php +++ b/routes/console.php @@ -44,7 +44,10 @@ Artisan::command('inspire', function () { } //Invoice report scheduling - $invoiceRules = AlertMailRule::where('module', 'InvoiceValidation')->get(); + $invoiceRules = AlertMailRule::where('module', 'InvoiceValidation') + ->select('plant', 'schedule_type') + ->distinct() + ->get(); foreach ($invoiceRules as $rule) { $type = $rule->schedule_type;