Merge pull request #7627 from turbo124/v5-develop
Do no alter client balance after an invoice has been marked as paid
This commit is contained in:
commit
f07c789877
1 changed files with 4 additions and 1 deletions
|
|
@ -304,9 +304,12 @@ class BaseRepository
|
|||
|
||||
if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT)) {
|
||||
|
||||
if($model->status_id != Invoice::STATUS_PAID)
|
||||
$model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save();
|
||||
|
||||
$model->service()->updateStatus()->save();
|
||||
$model->ledger()->updateInvoiceBalance(($state['finished_amount'] - $state['starting_amount']), "Update adjustment for invoice {$model->number}");
|
||||
$model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue