diff --git a/app/Services/Payment/DeletePayment.php b/app/Services/Payment/DeletePayment.php index 4c58a11b8c19..b0fd8aeab657 100644 --- a/app/Services/Payment/DeletePayment.php +++ b/app/Services/Payment/DeletePayment.php @@ -69,7 +69,7 @@ class DeletePayment private function updateClient() { - $this->payment->client->service()->updatePaidToDate(-1 * $this->payment->amount)->save(); + //$this->payment->client->service()->updatePaidToDate(-1 * $this->payment->amount)->save(); return $this; } @@ -92,6 +92,7 @@ class DeletePayment $paymentable_invoice->client ->service() ->updateBalance($paymentable_invoice->pivot->amount) + ->updatePaidToDate($paymentable_invoice->pivot->amount * -1) ->save(); if ($paymentable_invoice->balance == $paymentable_invoice->amount) {