Moved out rejected orders

This commit is contained in:
Deon George
2018-11-21 13:46:16 +11:00
parent aeacb726dd
commit 72fcdab84e
8 changed files with 139 additions and 4 deletions

View File

@@ -246,6 +246,16 @@ class User extends Authenticatable
return $result->flatten();
}
public function all_client_service_inactive()
{
$s = Service::InActive();
$aa = $this->all_accounts()->pluck('id')->unique()->toArray();
return $s->get()->filter(function($item) use ($aa) {
return in_array($item->account_id,$aa);
});
}
public function all_client_service_movements()
{
$s = Service::active()->where('order_status','!=','ACTIVE');