|
@@ -407,8 +407,11 @@ class HomeController extends Controller
|
|
->orWhere('cell_number', 'ILIKE', '%' . $term . '%');
|
|
->orWhere('cell_number', 'ILIKE', '%' . $term . '%');
|
|
});
|
|
});
|
|
|
|
|
|
- if($pro->pro_type != 'ADMIN'){
|
|
|
|
- $clientQuery->whereIn('id', $pro->getMyClientIds());
|
|
|
|
|
|
+ if($pro->pro_type != 'ADMIN') {
|
|
|
|
+ $clientQuery->where(function ($q) use ($pro) {
|
|
|
|
+ $q->whereIn('id', $pro->getMyClientIds())
|
|
|
|
+ ->orWhereNull('mcp_pro_id');
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
$clients = $clientQuery->get();
|
|
$clients = $clientQuery->get();
|