From 129a8a021084852bf849a932ff840162f4d2012e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 4 Oct 2021 21:10:56 +1100 Subject: [PATCH] Order gateways by is_default --- app/Services/Invoice/AutoBillInvoice.php | 4 ++-- resources/views/errors/guest.blade.php | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 resources/views/errors/guest.blade.php diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 96e72f487058..f450380f0ab9 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -306,8 +306,8 @@ 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; + $gateway_tokens = $this->client->gateway_tokens()->orderBy('is_default', 'DESC'); + // $gateway_tokens = $this->client->gateway_tokens; $filtered_gateways = $gateway_tokens->filter(function ($gateway_token) use($amount) { diff --git a/resources/views/errors/guest.blade.php b/resources/views/errors/guest.blade.php new file mode 100644 index 000000000000..9df84c302c60 --- /dev/null +++ b/resources/views/errors/guest.blade.php @@ -0,0 +1,5 @@ +@extends('portal.ninja2020.layout.error') + +@section('title', __('Server Error')) +@section('code', '500') +@section('message', __($message) ?: 'System Error')