Progress on order progress
This commit is contained in:
12
app/User.php
12
app/User.php
@@ -64,6 +64,16 @@ class User extends Authenticatable
|
||||
|
||||
protected $with = ['accounts'];
|
||||
|
||||
/**
|
||||
* Role hierarchy order
|
||||
* @var array
|
||||
*/
|
||||
public static $role_order = [
|
||||
'wholesaler',
|
||||
'reseller',
|
||||
'customer',
|
||||
];
|
||||
|
||||
/**
|
||||
* The accounts that this user manages
|
||||
*
|
||||
@@ -452,7 +462,7 @@ class User extends Authenticatable
|
||||
public function client_service_movements(): DatabaseCollection
|
||||
{
|
||||
return Service::active()
|
||||
->select(['id','account_id','product_id','order_status'])
|
||||
->select(['id','account_id','product_id','order_status','model'])
|
||||
->where('order_status','!=','ACTIVE')
|
||||
->whereIN('account_id',$this->all_accounts()->pluck('id')->unique()->toArray())
|
||||
->with(['account','product'])
|
||||
|
Reference in New Issue
Block a user