From dd2f9cf5453760abe57e12442eafa136776953eb Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 29 Mar 2022 20:09:08 +1100 Subject: [PATCH] Fixes for tests --- app/Services/Invoice/MarkPaid.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index 83cd30e3a8bd..9b29b072a9b8 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -96,10 +96,10 @@ class MarkPaid extends AbstractService $payment->ledger() ->updatePaymentBalance($payment->amount * -1); - $client = $this->invoice->client->fresh(); - $client->paid_to_date += $payment->amount; - $client->balance += $payment->amount * -1; - $client->save(); + $this->invoice->client->fresh(); + $this->invoice->client->paid_to_date += $payment->amount; + $this->invoice->client->balance += $payment->amount * -1; + $this->invoice->client->push(); $this->invoice = $this->invoice ->service()