From 1974f0e5f3660c66ff53b80993f71b073ee1350a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 13 Jan 2023 00:36:25 +1100 Subject: [PATCH] Set invoice autobill based on configuration --- app/Services/Invoice/InvoiceService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index bdc770c782..17a878106e 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -531,6 +531,10 @@ class InvoiceService $this->invoice->exchange_rate = $this->invoice->client->currency()->exchange_rate; } + if ($settings->auto_bill_standard_invoices) { + $this->invoice->auto_bill_enabled = true; + } + if ($settings->counter_number_applied == 'when_saved') { $this->invoice->service()->applyNumber()->save(); }