From 0bf387a56dfc8e2149a15427ebbcb37c0c7c27b9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 5 Oct 2021 12:02:01 +1100 Subject: [PATCH] Fixes for auto bill --- app/Services/Invoice/AutoBillInvoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index e3d2f15181fc..5bbb7352c4b4 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -304,7 +304,7 @@ class AutoBillInvoice extends AbstractService { //get all client gateway tokens and set the is_default one to the first record - $gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC'); + $gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC')->get(); // $gateway_tokens = $this->client->gateway_tokens; $filtered_gateways = $gateway_tokens->filter(function ($gateway_token) use($amount) {