cqpCow 2 tahun lalu
induk
melakukan
f99f10b378

+ 2 - 1
app/Service/FyyOrderService.php

@@ -103,7 +103,8 @@ class FyyOrderService extends Service
     public function orderList($data){
         $model = SaleOrdersProduct::where('del_time',0)
             ->select('id','order_no','out_order_no','out_order_no_time','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','out_checker_man','out_checker_time','production_quantity','box_num','finished_num','shipment_num')
-            ->orderBy('id','desc');
+            ->orderBy('crt_time','desc')
+            ->orderBy('id','asc');
 
         if(! empty($data['order_no'])) $model->where('order_no', 'LIKE', '%'.$data['order_no'].'%');
         if(! empty($data['out_order_no'])) $model->where('out_order_no', 'LIKE', '%'.$data['out_order_no'].'%');

+ 1 - 1
app/Service/ProductionOrderService.php

@@ -187,7 +187,7 @@ class ProductionOrderService extends Service
 
         $result = SaleOrdersProduct::whereIn('id',$data['id'])
             ->select('id as sale_orders_product_id','order_no','out_order_no','out_order_no_time','customer_no','customer_name','table_header_mark','product_no','product_title','product_size','product_unit','order_quantity','technology_material','technology_name','wood_name','process_mark','table_body_mark','out_crt_man','out_checker_man','out_checker_time','production_quantity','price')
-            ->orderBy('id','desc')
+            ->orderBy('id','asc')
             ->get()->toArray();
 
         foreach ($result as $key => $value){