mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fix for client numbers
This commit is contained in:
parent
6ff1c79db3
commit
06d5509805
@ -43,13 +43,18 @@ trait GeneratesNumbers
|
|||||||
|
|
||||||
// update the counter to be caught up
|
// update the counter to be caught up
|
||||||
if ($counterOffset > 1) {
|
if ($counterOffset > 1) {
|
||||||
if ($entity->isType(INVOICE_TYPE_QUOTE) && !$this->share_counter) {
|
if ($entity->isEntityType(ENTITY_CLIENT)) {
|
||||||
|
if ($this->clientNumbersEnabled()) {
|
||||||
|
$this->client_number_counter += $counterOffset - 1;
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
|
} elseif ($entity->isType(INVOICE_TYPE_QUOTE) && !$this->share_counter) {
|
||||||
$this->quote_number_counter += $counterOffset - 1;
|
$this->quote_number_counter += $counterOffset - 1;
|
||||||
|
$this->save();
|
||||||
} else {
|
} else {
|
||||||
$this->{$entityType.'_number_counter'} += $counterOffset - 1;
|
$this->invoice_number_counter += $counterOffset - 1;
|
||||||
|
$this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($entity->recurring_invoice_id) {
|
if ($entity->recurring_invoice_id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user