From 29a7225d641d31dd4e3aaf57b3f40ed202594c22 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 22 Oct 2021 20:55:40 +1100 Subject: [PATCH] Mark as sent when we get to the payment screen --- app/Services/ClientPortal/InstantPayment.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/ClientPortal/InstantPayment.php b/app/Services/ClientPortal/InstantPayment.php index 6d17873c8668..dfb41fa78c97 100644 --- a/app/Services/ClientPortal/InstantPayment.php +++ b/app/Services/ClientPortal/InstantPayment.php @@ -70,7 +70,10 @@ class InstantPayment $invoices = Invoice::whereIn('id', $this->transformKeys($payable_invoices->pluck('invoice_id')->toArray()))->withTrashed()->get(); $invoices->each(function($invoice){ - $invoice->service()->removeUnpaidGatewayFees()->save(); + $invoice->service() + ->marksent() + ->removeUnpaidGatewayFees() + ->save(); }); /* pop non payable invoice from the $payable_invoices array */