cqpCow 1 år sedan
förälder
incheckning
35dcae55f0
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      app/Service/SalesOrderService.php

+ 3 - 3
app/Service/SalesOrderService.php

@@ -600,12 +600,12 @@ class SalesOrderService extends Service
         if(! empty($data['order_type'])) $model->where('order_type',$data['order_type']);
         if(! empty($data['business_type'])) $model->where('business_type',$data['business_type']);
         if(! empty($data['sale_type'])) $model->where('sale_type',$data['sale_type']);
-        if(! empty($data['plat_type'])) $model->where('order_type',$data['plat_type']);
+        if(! empty($data['plat_type'])) $model->where('plat_type',$data['plat_type']);
         if(! empty($data['plat_order'])) $model->where('plat_order','LIKE', '%'.$data['plat_order'].'%');
         if(! empty($data['customer'])) {
             $model2 = Customer::Clear($user,$data);
-            $customer = $model->where('del_time',0)
-                ->where('title', 'LIKE', '%'.$data['title'].'%')
+            $customer = $model2->where('del_time',0)
+                ->where('title', 'LIKE', '%'.$data['customer'].'%')
                 ->select('id')
                 ->get()->toArray();
             $model->whereIn('customer_id',array_unique(array_column($customer,'id')));