shish 3 лет назад
Родитель
Сommit
04e2784501
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      biz-ghs/order/classes/PurchaseOrderClass.php

+ 3 - 3
biz-ghs/order/classes/PurchaseOrderClass.php

@@ -451,9 +451,9 @@ class PurchaseOrderClass extends BaseClass
                 $unitCgPrice = $v['bigPrice'] ?? 0;
                 $productWeight = $productList[$productId]['weight'] ?? 0;
                 $unitFreight = bcmul($avgKgWeight, $productWeight, 2);
-                $unitCost = bcadd($unitCgPrice, $unitFreight, 2);
-                //四舍五入取整数
-                //$unitCost = round($unitCost);
+                $unitCost = bcadd($unitCgPrice, $unitFreight, 3);
+                $unitCost = round($unitCost, 2);
+
                 $batchData[$currentKey]['bigFreight'] = $unitFreight;
                 $batchData[$currentKey]['cost'] = $unitCost;