Zhouzhendong 5 лет назад
Родитель
Сommit
a5652e4536
1 измененных файлов с 5 добавлено и 7 удалено
  1. 5 7
      app/Services/OwnerAreaReportService.php

+ 5 - 7
app/Services/OwnerAreaReportService.php

@@ -63,14 +63,12 @@ class OwnerAreaReportService
                 if ($report){
                     if (!$area->ownerStoragePriceModel)return false;
                     $storeFee = app("OwnerStoragePriceModelService")->calculationAmount($area->ownerStoragePriceModel, $values["accounting_area"], $area->owner_id, $area->counting_month);
-                    if ($storeFee != 0){
-                        $up = ["storage_fee"=>$storeFee];
-                        if ($report->confirm_fee !== null || $report->confirmed == '是'){
-                            $initial = $report->work_fee + $report->logistic_fee + $storeFee;
-                            $up["difference"] = $initial - $report->confirm_fee;
-                        }
-                        $report->update($up);
+                    $up = ["storage_fee"=>$storeFee];
+                    if ($report->confirm_fee !== null || $report->confirmed == '是'){
+                        $initial = $report->work_fee + $report->logistic_fee + $storeFee;
+                        $up["difference"] = $initial - $report->confirm_fee;
                     }
+                    $report->update($up);
                 }
             }
             $area->update($values);