From db95e9fad3aaf359135720b619d7fc0d5b46191f Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 7 Mar 2022 20:06:20 +1100 Subject: [PATCH 1/3] fixes for migration --- app/Http/Controllers/ClientPortal/NinjaPlanController.php | 2 +- .../migration/{failed_text.blade => failed_text.blade.php} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename resources/views/email/migration/{failed_text.blade => failed_text.blade.php} (100%) diff --git a/app/Http/Controllers/ClientPortal/NinjaPlanController.php b/app/Http/Controllers/ClientPortal/NinjaPlanController.php index d980dd3a27ec..ce2bf9809f64 100644 --- a/app/Http/Controllers/ClientPortal/NinjaPlanController.php +++ b/app/Http/Controllers/ClientPortal/NinjaPlanController.php @@ -134,7 +134,7 @@ class NinjaPlanController extends Controller // $account = auth()->guard('contact')->user()->company->account; if(auth()->guard('contact')->user()->client->custom_value2){ MultiDB::findAndSetDbByAccountKey(auth()->guard('contact')->user()->client->custom_value2); - $account = Account::where('key', auth()->guard('contact')->user()->client->custom_value2); + $account = Account::where('key', auth()->guard('contact')->user()->client->custom_value2)->first(); $account->trial_started = now(); $account->trial_plan = 'pro'; $account->save(); diff --git a/resources/views/email/migration/failed_text.blade b/resources/views/email/migration/failed_text.blade.php similarity index 100% rename from resources/views/email/migration/failed_text.blade rename to resources/views/email/migration/failed_text.blade.php From 0ae4fe411709793887ee43ada0cbabc2fde5c88c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 8 Mar 2022 07:18:44 +1100 Subject: [PATCH 2/3] Ensure factories for invoice,quotes,credits have at least todays date on them --- app/Factory/CreditFactory.php | 2 +- app/Factory/InvoiceFactory.php | 2 +- app/Factory/QuoteFactory.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Factory/CreditFactory.php b/app/Factory/CreditFactory.php index f950be7d610e..99a600f30579 100644 --- a/app/Factory/CreditFactory.php +++ b/app/Factory/CreditFactory.php @@ -28,7 +28,7 @@ class CreditFactory $credit->terms = ''; $credit->public_notes = ''; $credit->private_notes = ''; - $credit->date = null; + $credit->date = now()->format('Y-m-d'); $credit->due_date = null; $credit->partial_due_date = null; $credit->is_deleted = false; diff --git a/app/Factory/InvoiceFactory.php b/app/Factory/InvoiceFactory.php index 0d3a5e334a1e..659233c2e6e7 100644 --- a/app/Factory/InvoiceFactory.php +++ b/app/Factory/InvoiceFactory.php @@ -27,7 +27,7 @@ class InvoiceFactory $invoice->terms = ''; $invoice->public_notes = ''; $invoice->private_notes = ''; - $invoice->date = null; + $invoice->date = now()->format('Y-m-d'); $invoice->due_date = null; $invoice->partial_due_date = null; $invoice->is_deleted = false; diff --git a/app/Factory/QuoteFactory.php b/app/Factory/QuoteFactory.php index 11f278de2695..a0aa06e7ceb5 100644 --- a/app/Factory/QuoteFactory.php +++ b/app/Factory/QuoteFactory.php @@ -27,7 +27,7 @@ class QuoteFactory $quote->terms = ''; $quote->public_notes = ''; $quote->private_notes = ''; - $quote->date = null; + $quote->date = now()->format('Y-m-d'); $quote->due_date = null; $quote->partial_due_date = null; $quote->is_deleted = false; From bb11391d523ffa9b0f5d27f9b95641078734fb29 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 8 Mar 2022 10:51:07 +1100 Subject: [PATCH 3/3] Fixes for ACSS payments --- .../ninja2020/gateways/stripe/acss/pay.blade.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php b/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php index 97b69f1bc763..bb9bc2ea50c7 100644 --- a/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php +++ b/resources/views/portal/ninja2020/gateways/stripe/acss/pay.blade.php @@ -1,8 +1,15 @@ @extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Pre-authorized debit payments', 'card_title' => 'Pre-authorized debit payments']) @section('gateway_head') - - + + @if($gateway->company_gateway->getConfigField('account_id')) + + + @else + + @endif + +