mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Adjust client balance when deleting payment
This commit is contained in:
parent
83e62dcd90
commit
920bbf8b75
@ -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…
Reference in New Issue
Block a user