Site related updates

This commit is contained in:
Deon George
2021-12-17 16:09:03 +11:00
parent 8d194c5523
commit b7b6a575bc
10 changed files with 71 additions and 19 deletions

View File

@@ -67,11 +67,11 @@ class OrderController extends Controller
// If this is a new client
if (! $uo->exists) {
// @todo Make this automatic
$uo->site_id = config('SITE')->site_id;
$uo->site_id = config('site')->site_id;
$uo->active = FALSE;
$uo->firstname = '';
$uo->lastname = '';
$uo->country_id = config('SITE')->country_id; // @todo This might be wrong
$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->active = 1;
$uo->save();
@@ -83,10 +83,10 @@ class OrderController extends Controller
$ao = new Account;
//$ao->id = Account::NextId();
// @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->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);
@@ -97,7 +97,7 @@ class OrderController extends Controller
$so = new Service;
// @todo Make this automatic
$so->site_id = config('SITE')->site_id;
$so->site_id = config('site')->site_id;
$so->product_id = $request->input('product_id');
$so->order_status = 'ORDER-SUBMIT';
$so->orderby_id = Auth::id();