From bef4e5faeae7944a4ba42ce40c767ddee763b92a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 7 Jun 2016 16:45:21 +0300 Subject: [PATCH] Fix for quote number prefix --- app/Models/Account.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Account.php b/app/Models/Account.php index 7f6218462536..b86dcfeacd44 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -633,11 +633,11 @@ class Account extends Eloquent public function getNextInvoiceNumber($invoice) { - if ($this->hasNumberPattern($invoice->invoice_type_id)) { + if ($this->hasNumberPattern($invoice->is_quote)) { $number = $this->getNumberPattern($invoice); } else { - $counter = $this->getCounter($invoice->invoice_type_id); - $prefix = $this->getNumberPrefix($invoice->invoice_type_id); + $counter = $this->getCounter($invoice->is_quote); + $prefix = $this->getNumberPrefix($invoice->is_quote); $counterOffset = 0; // confirm the invoice number isn't already taken