User optimisation and code cleanup
This commit is contained in:
@@ -317,6 +317,18 @@ class Service extends Model implements IDs
|
||||
return sprintf('%02s-%04s.%s',$this->site_id,$this->account_id,$this->getLIDattribute());
|
||||
}
|
||||
|
||||
/* STATIC */
|
||||
|
||||
public static function movements(User $uo): Collection
|
||||
{
|
||||
return (new self)
|
||||
->active()
|
||||
->serviceUserAuthorised($uo)
|
||||
->where('order_status','!=','ACTIVE')
|
||||
->with(['account','product'])
|
||||
->get();
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user