cqpCow 2 жил өмнө
parent
commit
9a1346d97d

+ 2 - 3
app/Service/FyyOrderService.php

@@ -245,9 +245,8 @@ class FyyOrderService extends Service
                 'state' => 2,
             ]);
             foreach ($data['box_data'] as $value){
-                SaleOrdersProduct::where('out_order_no',$data['order_number'])->update([
-                    'id' => $value['top_id'],
-                    'shipment_num' => $value['num'],
+                SaleOrdersProduct::where('id',$data['top_id'])->update([
+                    'shipment_num' => DB::raw("shipment_num + {$value['num']}"),
                 ]);
             }
             DB::commit();