Adjust client balance when deleting payment
This commit is contained in:
parent
83e62dcd90
commit
920bbf8b75
1 changed files with 2 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ class DeletePayment
|
|||
|
||||
$paymentable_invoice->service()->updateBalance($paymentable_invoice->pivot->amount)->save();
|
||||
$paymentable_invoice->ledger()->updateInvoiceBalance($paymentable_invoice->pivot->amount)->save();
|
||||
|
||||
$paymentable_invoice->client->service()->updateBalance($paymentable_invoice->pivot->amount)->save();
|
||||
|
||||
if(floatval($paymentable_invoice->balance) == 0)
|
||||
$paymentable_invoice->service()->setStatus(Invoice::STATUS_SENT)->save();
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue