Fixes for delete payment

This commit is contained in:
David Bomba 2022-03-14 20:52:38 +11:00
parent 3eeed5e135
commit b9073c4276

View File

@ -90,6 +90,8 @@ class DeletePayment
if(!$paymentable_invoice->is_deleted)
{
$paymentable_invoice->restore();
$paymentable_invoice->service()
->updateBalance($net_deletable)
->updatePaidToDate($net_deletable * -1)
@ -112,6 +114,8 @@ class DeletePayment
}
else {
$paymentable_invoice->restore();
//If the invoice is deleted we only update the meta data on the invoice
//and reduce the clients paid to date
$paymentable_invoice->service()