mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 22:14:36 -04:00
Minor fixes
This commit is contained in:
parent
f07c789877
commit
49683e8654
@ -302,12 +302,11 @@ class BaseRepository
|
|||||||
/* Perform model specific tasks */
|
/* Perform model specific tasks */
|
||||||
if ($model instanceof Invoice) {
|
if ($model instanceof Invoice) {
|
||||||
|
|
||||||
if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT)) {
|
if (($state['finished_amount'] != $state['starting_amount']) && ($model->status_id != Invoice::STATUS_DRAFT && $model->status_id != Invoice::STATUS_PAID)) {
|
||||||
|
|
||||||
if($model->status_id != Invoice::STATUS_PAID)
|
//10-07-2022
|
||||||
$model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save();
|
|
||||||
|
|
||||||
$model->service()->updateStatus()->save();
|
$model->service()->updateStatus()->save();
|
||||||
|
$model->client->service()->updateBalance(($state['finished_amount'] - $state['starting_amount']))->save();
|
||||||
$model->ledger()->updateInvoiceBalance(($state['finished_amount'] - $state['starting_amount']), "Update adjustment for invoice {$model->number}");
|
$model->ledger()->updateInvoiceBalance(($state['finished_amount'] - $state['starting_amount']), "Update adjustment for invoice {$model->number}");
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user