diff --git a/app/Services/Payment/RefundPayment.php b/app/Services/Payment/RefundPayment.php index 2b4b36df758f..17391f96bc81 100644 --- a/app/Services/Payment/RefundPayment.php +++ b/app/Services/Payment/RefundPayment.php @@ -277,6 +277,9 @@ class RefundPayment $invoice->service()->setStatus(Invoice::STATUS_PARTIAL); } + //26-10-2022 - disable autobill to prevent future billings; + $invoice->auto_bill_enabled = false; + $invoice->saveQuietly(); //06-09-2022 @@ -285,10 +288,6 @@ class RefundPayment ->updateBalance($refunded_invoice['amount']) ->save(); - // $client = $invoice->client; - // $client->balance += $refunded_invoice['amount']; - // $client->save(); - $transaction = [ 'invoice' => $invoice->transaction_event(), 'payment' => [],