From 7c91082ca81f3c30f1598fca3987046fe5596c2f Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 1 Feb 2024 09:51:58 +1100 Subject: [PATCH] Fix user creation in order - language_id doesnt have a default value --- app/Http/Controllers/OrderController.php | 3 +-- app/Jobs/AccountingPaymentSync.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/OrderController.php b/app/Http/Controllers/OrderController.php index 35cf7a8..6cecab0 100644 --- a/app/Http/Controllers/OrderController.php +++ b/app/Http/Controllers/OrderController.php @@ -78,6 +78,7 @@ class OrderController extends Controller $uo->lastname = ''; $uo->country_id = config('site')->country_id; // @todo This might be wrong $uo->parent_id = Auth::id() ?: 1; // @todo This should be configured to a default user + $uo->language_id = config('site')->language_id; // @todo This might be wrong $uo->active = 1; $uo->save(); } @@ -90,8 +91,6 @@ class OrderController extends Controller // @todo Make this automatic $ao->site_id = config('site')->site_id; $ao->country_id = config('site')->country_id; // @todo This might be wrong - $ao->language_id = config('site')->language_id; // @todo This might be wrong - $ao->currency_id = config('site')->currency_id; // @todo This might be wrong $ao->active = 1; $uo->accounts()->save($ao); diff --git a/app/Jobs/AccountingPaymentSync.php b/app/Jobs/AccountingPaymentSync.php index b486080..a489e37 100644 --- a/app/Jobs/AccountingPaymentSync.php +++ b/app/Jobs/AccountingPaymentSync.php @@ -20,7 +20,7 @@ use Intuit\Models\Payment as PaymentModel; * * This will: * + Create/Update the payment in our system - * + Assocate the payment to the same invoice in our system + * + Associate the payment to the same invoice in our system */ class AccountingPaymentSync implements ShouldQueue {