From 637cf49e1e379e85aaf2ee902f6fd2e8a01bfb98 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 9 Jan 2017 13:12:38 +0200 Subject: [PATCH] Fix for invoice counter --- app/Models/Account.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index 9b5ab1c138fa..a27074edbd03 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -1021,8 +1021,10 @@ class Account extends Eloquent // update the invoice counter to be caught up if ($counterOffset > 1) { - if ($invoice->isType(INVOICE_TYPE_QUOTE) && !$this->share_counter) { - $this->quote_number_counter += $counterOffset - 1; + if ($invoice->isType(INVOICE_TYPE_QUOTE)) { + if ( ! $this->share_counter) { + $this->quote_number_counter += $counterOffset - 1; + } } else { $this->invoice_number_counter += $counterOffset - 1; }