From de41d2546c5b1969d9ff147f528aa4334d7f6543 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 13 Jan 2023 22:26:12 +1100 Subject: [PATCH] Fixes for touching reminders inappropriately --- app/Jobs/Invoice/BulkInvoiceJob.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Invoice/BulkInvoiceJob.php b/app/Jobs/Invoice/BulkInvoiceJob.php index d46a2b009a..585aeae593 100644 --- a/app/Jobs/Invoice/BulkInvoiceJob.php +++ b/app/Jobs/Invoice/BulkInvoiceJob.php @@ -54,8 +54,9 @@ class BulkInvoiceJob implements ShouldQueue * @return void */ public function handle() - { - $this->invoice->service()->touchReminder($this->reminder_template)->markSent()->save(); + { //only the reminder should mark the reminder sent field + // $this->invoice->service()->touchReminder($this->reminder_template)->markSent()->save(); + $this->invoice->service()->markSent()->save(); $this->invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) { EmailEntity::dispatch($invitation, $this->invoice->company, $this->reminder_template)->delay(now()->addSeconds(5));