diff --git a/app/Services/Payment/DeletePayment.php b/app/Services/Payment/DeletePayment.php index 11b29c370693..f4ad8fbb23f2 100644 --- a/app/Services/Payment/DeletePayment.php +++ b/app/Services/Payment/DeletePayment.php @@ -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