cqp пре 3 месеци
родитељ
комит
82d493a525
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      app/Service/CustomerService.php

+ 4 - 2
app/Service/CustomerService.php

@@ -657,8 +657,10 @@ class CustomerService extends Service
         if(! empty($data['belong_top_depart_title'])){
             list($id, $depart_id) = $this->searchCustomerDepart($data['belong_top_depart_title']);
             if($is_fp < 0){
-                $model->whereIn('id', $id)
-                    ->orWhereIn('top_depart_id', $depart_id);
+                $model->where(function ($query) use ($id, $depart_id) {
+                    $query->whereIn('id', $id)
+                        ->orWhereIn('top_depart_id', $depart_id);
+                });
             }elseif ($is_fp > 0){
                 $model->whereIn('id', $id);
             }else{