From b9073c4276063de8d3ab04450a49ee225a07eca7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 14 Mar 2022 20:52:38 +1100 Subject: [PATCH] Fixes for delete payment --- app/Services/Payment/DeletePayment.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Services/Payment/DeletePayment.php b/app/Services/Payment/DeletePayment.php index 654448a8d6d4..f4f630bd701e 100644 --- a/app/Services/Payment/DeletePayment.php +++ b/app/Services/Payment/DeletePayment.php @@ -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()