From d279a1254791d46334df0878e759db542899ea71 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sat, 26 Nov 2022 14:14:56 +1100 Subject: [PATCH] minor refactor for reminder jobs --- app/Jobs/Util/ReminderJob.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/Util/ReminderJob.php b/app/Jobs/Util/ReminderJob.php index 6a2f55d754a8..f5c64f38fcb9 100644 --- a/app/Jobs/Util/ReminderJob.php +++ b/app/Jobs/Util/ReminderJob.php @@ -87,7 +87,8 @@ class ReminderJob implements ShouldQueue $query->where('is_disabled', 0); }) ->with('invitations')->cursor()->each(function ($invoice) { - if ($invoice->refresh() && $invoice->isPayable()) { + // if ($invoice->refresh() && $invoice->isPayable()) { + if ($invoice->isPayable()) { //Attempts to prevent duplicates from sending if($invoice->reminder_last_sent && Carbon::parse($invoice->reminder_last_sent)->startOfDay()->eq(now()->startOfDay())){