Site related updates
This commit is contained in:
@@ -31,7 +31,7 @@ class AdminController extends Controller
|
||||
]);
|
||||
|
||||
if (! $o->exists) {
|
||||
$o->site_id = config('SITE')->site_id;
|
||||
$o->site_id = config('site')->site_id;
|
||||
$o->user_id = Auth::id();
|
||||
$o->active = TRUE;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ class AdminController extends Controller
|
||||
|
||||
if (! $o->exists) {
|
||||
$o->forceFill($request->only(['account_id','payment_date','checkout_id','checkout_id','total_amt','fees_amt','source_id','pending','notes','ip']));
|
||||
$o->site_id = config('SITE')->site_id;
|
||||
$o->site_id = config('site')->site_id;
|
||||
$o->save();
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class AdminController extends Controller
|
||||
}
|
||||
|
||||
$oo->alloc_amt = ($oo->invoice->due >= 0) && ($oo->invoice->due-$amount >= 0) ? $amount : 0;
|
||||
$oo->site_id = config('SITE')->site_id;
|
||||
$oo->site_id = config('site')->site_id;
|
||||
$o->items()->save($oo);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class AdminController extends Controller
|
||||
'email_logo' => 'nullable|image',
|
||||
]);
|
||||
|
||||
$site = config('SITE');
|
||||
$site = config('site');
|
||||
|
||||
// @todo - not currently rendered in the home page
|
||||
$validated['social'] = [];
|
||||
|
@@ -46,7 +46,7 @@ class LoginController extends Controller
|
||||
{
|
||||
$this->validateLogin($request);
|
||||
|
||||
if (Auth::attempt(array_merge($this->credentials($request),['active'=>TRUE,'site_id'=>config('site')->site_id]))) {
|
||||
if (Auth::attempt(array_merge($this->credentials($request),['active'=>TRUE]))) {
|
||||
$request->session()->regenerate();
|
||||
|
||||
return $this->sendLoginResponse($request);
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user