From aeef73ec6585f6c7bfe6372a9da4efd963be8e5a Mon Sep 17 00:00:00 2001 From: denisdulici Date: Sun, 3 Jun 2018 00:30:08 +0300 Subject: [PATCH] fixed #371 --- app/Console/Commands/BillReminder.php | 6 +++++- app/Console/Commands/InvoiceReminder.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/BillReminder.php b/app/Console/Commands/BillReminder.php index 8c5cf2a1e..77362cf31 100644 --- a/app/Console/Commands/BillReminder.php +++ b/app/Console/Commands/BillReminder.php @@ -53,7 +53,11 @@ class BillReminder extends Command $company->setSettings(); - //$days = explode(',', setting('general.schedule_bill_days', '1,3')); + // Don't send reminders if disabled + if (!$company->send_bill_reminder) { + continue; + } + $days = explode(',', $company->schedule_bill_days); foreach ($days as $day) { diff --git a/app/Console/Commands/InvoiceReminder.php b/app/Console/Commands/InvoiceReminder.php index bb10f505e..cc459c114 100644 --- a/app/Console/Commands/InvoiceReminder.php +++ b/app/Console/Commands/InvoiceReminder.php @@ -53,7 +53,11 @@ class InvoiceReminder extends Command $company->setSettings(); - //$days = explode(',', config('general.schedule_invoice_days', '1,3')); + // Don't send reminders if disabled + if (!$company->send_invoice_reminder) { + continue; + } + $days = explode(',', $company->schedule_invoice_days); foreach ($days as $day) {