Fix counter when using quote number for invoice

This commit is contained in:
Hillel Coren 2017-11-26 11:51:35 +02:00
parent 8e6cfe706f
commit c9ba38e06c

View File

@ -861,6 +861,10 @@ class InvoiceRepository extends BaseRepository
->whereInvoiceNumber($invoiceNumber)
->first()) {
$invoiceNumber = false;
} else {
// since we aren't using the counter we need to offset it by one
$account->invoice_number_counter -= 1;
$account->save();
}
}