|
|
@@ -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;
|
|
|
|