Fix user creation in order - language_id doesnt have a default value

This commit is contained in:
Deon George 2024-02-01 09:51:58 +11:00
parent 27720ee882
commit 7c91082ca8
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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
{