1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Reset credit counter

This commit is contained in:
Hillel Coren 2017-06-28 17:10:57 +03:00
parent efd2461646
commit b561bfd594
2 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class PurgeAccountData extends Job
$account->invoice_number_counter = 1;
$account->quote_number_counter = 1;
$account->credit_number_counter = 1;
$account->credit_number_counter = $account->credit_number_counter > 0 ? 1 : 0;
$account->client_number_counter = $account->client_number_counter > 0 ? 1 : 0;
$account->save();

View File

@ -356,6 +356,7 @@ trait GeneratesNumbers
$this->reset_counter_date = $resetDate->format('Y-m-d');
$this->invoice_number_counter = 1;
$this->quote_number_counter = 1;
$this->credit_number_counter = 1;
$this->save();
}
}