|
@@ -179,11 +179,11 @@ class PurchaseOrderClass extends BaseClass
|
|
|
ProductClass::addStockByItemNum($productId, $v['itemNum']);
|
|
ProductClass::addStockByItemNum($productId, $v['itemNum']);
|
|
|
|
|
|
|
|
//单位采购价
|
|
//单位采购价
|
|
|
- $unitCgPrice = $v['itemPrice'] ?? 0;
|
|
|
|
|
|
|
+ $unitCgPrice = $v['bigPrice'] ?? 0;
|
|
|
$productWeight = $productList[$productId]['weight'] ?? 0;
|
|
$productWeight = $productList[$productId]['weight'] ?? 0;
|
|
|
$unitFreight = bcmul($avgKgWeight, $productWeight, 2);
|
|
$unitFreight = bcmul($avgKgWeight, $productWeight, 2);
|
|
|
$unitCost = bcadd($unitCgPrice, $unitFreight, 2);
|
|
$unitCost = bcadd($unitCgPrice, $unitFreight, 2);
|
|
|
- //成本价四舍五入取整数
|
|
|
|
|
|
|
+ //四舍五入取整数
|
|
|
$unitCost = round($unitCost);
|
|
$unitCost = round($unitCost);
|
|
|
$batchData[$currentKey]['bigFreight'] = $unitFreight;
|
|
$batchData[$currentKey]['bigFreight'] = $unitFreight;
|
|
|
|
|
|