1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Minor corrections for ledge balance when pre payments used.

This commit is contained in:
David Bomba 2024-10-03 17:14:56 +10:00
parent 7c9b4fe0bf
commit 8aed90a060

View File

@ -97,6 +97,11 @@ class UpdateInvoicePayment
$p->pivot->forceDelete();
});
$invoice
->ledger()
->updateInvoiceBalance($paid_amount*-1, "Prepayment Balance Adjustment");
$invoice->is_deleted = true;
$invoice->deleted_at = now();
$invoice->saveQuietly();