diff --git a/app/Jobs/Cron/RecurringInvoicesCron.php b/app/Jobs/Cron/RecurringInvoicesCron.php index e9a57d854d35..0350b61749ec 100644 --- a/app/Jobs/Cron/RecurringInvoicesCron.php +++ b/app/Jobs/Cron/RecurringInvoicesCron.php @@ -76,7 +76,7 @@ class RecurringInvoicesCron nlog(now()->format('Y-m-d') . ' Sending Recurring Invoices. Count = '.$recurring_invoices->count().' On Database # '.$db); $recurring_invoices->each(function ($recurring_invoice, $key) { - nlog("Current date = " . now()->format("Y-m-d") . " Recurring date = " .$recurring_invoice->next_send_date); + nlog("Current date = " . now()->format("Y-m-d") . " Recurring date = " .$recurring_invoice->next_send_date ." Recurring #id = ". $recurring_invoice->id); if (!$recurring_invoice->company->is_disabled) { SendRecurring::dispatchNow($recurring_invoice, $recurring_invoice->company->db); diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 9bc48a63407d..7097b7f87375 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -56,6 +56,7 @@ class ReminderJob implements ShouldQueue nlog("Sending invoice reminders " . now()->format('Y-m-d h:i:s')); Invoice::where('next_send_date', '<=', now()->toDateTimeString()) + ->whereNull('deleted_at') ->where('is_deleted', 0) ->whereIn('status_id', [Invoice::STATUS_SENT, Invoice::STATUS_PARTIAL]) ->where('balance', '>', 0)