From 052fb222d583425e4687a1328abe69dfdf4b77f9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 26 Jul 2021 19:55:54 +1000 Subject: [PATCH] Minor fixes for invoice notifications --- app/Models/Invoice.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 34aa257d3129..db95b09c8e02 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -477,19 +477,19 @@ class Invoice extends BaseModel { switch ($reminder_template) { case 'invoice': - event(new InvoiceWasEmailed($invitation, $invitation->company, Ninja::eventVars(), $template)); + event(new InvoiceWasEmailed($invitation, $invitation->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), $template)); break; case 'reminder1': - event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(), Activity::INVOICE_REMINDER1_SENT)); + event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), Activity::INVOICE_REMINDER1_SENT)); break; case 'reminder2': - event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(), Activity::INVOICE_REMINDER2_SENT)); + event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), Activity::INVOICE_REMINDER2_SENT)); break; case 'reminder3': - event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(), Activity::INVOICE_REMINDER3_SENT)); + event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), Activity::INVOICE_REMINDER3_SENT)); break; case 'reminder_endless': - event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(), Activity::INVOICE_REMINDER_ENDLESS_SENT)); + event(new InvoiceReminderWasEmailed($invitation, $invitation->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), Activity::INVOICE_REMINDER_ENDLESS_SENT)); break; default: # code...