Просмотр исходного кода

运输管理--仓库计重手动刷新修改

haozi 5 лет назад
Родитель
Сommit
beb5f1cd36
1 измененных файлов с 5 добавлено и 7 удалено
  1. 5 7
      app/Http/Controllers/WaybillController.php

+ 5 - 7
app/Http/Controllers/WaybillController.php

@@ -879,13 +879,11 @@ class WaybillController extends Controller
             if (!$waybill->grossweight&& $waybill->netweight) $warehouseWeight +=$waybill->netweight;
         }
         $warehouseWeight=round($warehouseWeight,2);
-        if ($warehouseWeight!=0){
-            $waybill=Waybill::where('wms_bill_number',$wms_bill_number)->first();
-            if ($waybill['warehouse_weight_other']!=$warehouseWeight){
-                $waybill['warehouse_weight_other']=$warehouseWeight;
-                $waybill->update();
-                $this->log(__METHOD__,'刷新仓库计重'.__FUNCTION__,json_encode($request->toArray()),Auth::user()['id']);
-            }
+        $waybill=Waybill::where('wms_bill_number',$wms_bill_number)->first();
+        if ($waybill['warehouse_weight_other']!=$warehouseWeight){
+            $waybill['warehouse_weight_other']=$warehouseWeight;
+            $waybill->update();
+            $this->log(__METHOD__,'刷新仓库计重'.__FUNCTION__,json_encode($request->toArray()),Auth::user()['id']);
         }
         return ['success'=>true,'warehouseWeight'=>$warehouseWeight];
     }