From 7e908ef776f4647978a7df38e0f8421c73fb4f68 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 17 Jan 2021 20:14:56 +1100 Subject: [PATCH] Fire notification when sending recurring invoice --- app/Jobs/RecurringInvoice/SendRecurring.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Jobs/RecurringInvoice/SendRecurring.php b/app/Jobs/RecurringInvoice/SendRecurring.php index b66f1a164a..0b3f1b5241 100644 --- a/app/Jobs/RecurringInvoice/SendRecurring.php +++ b/app/Jobs/RecurringInvoice/SendRecurring.php @@ -74,6 +74,11 @@ class SendRecurring implements ShouldQueue } }); + //Admin notification for recurring invoice sent. + if ($invoice->invitations->count() >= 1) { + $invoice->entityEmailEvent($invoice->invitations->first(), 'invoice', 'email_template_invoice'); + } + if ($invoice->client->getSetting('auto_bill_date') == 'on_send_date' && $this->recurring_invoice->auto_bill_enabled) { $invoice->service()->autoBill()->save(); }