cqpCow hace 11 meses
padre
commit
5d730a9f7e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      app/Service/PurchaseOrderService.php

+ 2 - 0
app/Service/PurchaseOrderService.php

@@ -350,6 +350,8 @@ class PurchaseOrderService extends Service
         $model = PurchaseOrder::Clear($user,$data);
         $model = $model->where('del_time',0)->select('order_number','id','depart_id','top_depart_id','mark','crt_time','state','crt_id','order_type','sales_order_id','supplier','purchase_id','purchase_total','discount_fee','other_fee','total','storehouse_id')
             ->orderby('id', 'desc');
+        
+        if(! empty($data['purchase_id'])) $model->where('id', $data['purchase_id']);
         if(! empty($data['order_number'])) $model->where('order_number', 'LIKE', '%'.$data['order_number'].'%');
         if(! empty($data['depart_id'])) $model->where('depart_id', $data['depart_id']);
         if(! empty($data['company_id'])) $model->where('company_id', $data['company_id']);