|
|
@@ -1370,6 +1370,7 @@ class ProductClass extends BaseClass
|
|
|
//满减累计
|
|
|
$totalReachDiscount = 0;
|
|
|
|
|
|
+ $totalCost = 0;
|
|
|
foreach ($itemInfo as $v) {
|
|
|
$ghsProductId = $v['productId'];
|
|
|
|
|
|
@@ -1472,6 +1473,9 @@ class ProductClass extends BaseClass
|
|
|
|
|
|
$xhPrice = bcmul($xhNum, $itemPrice, 2);
|
|
|
|
|
|
+ $currentCost = bcmul($xhNum, $cost, 2);
|
|
|
+ $totalCost = bcadd($totalCost, $currentCost, 2);
|
|
|
+
|
|
|
$tmp['xhNum'] = $xhNum;
|
|
|
$tmp['xhUnitName'] = $xhUnitName;
|
|
|
$tmp['xhUnitType'] = $xhUnitType;
|
|
|
@@ -1486,7 +1490,8 @@ class ProductClass extends BaseClass
|
|
|
$data[] = $tmp;
|
|
|
}
|
|
|
|
|
|
- return ['product' => $data, 'totalReachDiscount' => $totalReachDiscount, 'smallNum' => $totalSmallNum, 'bigNum' => $totalBigNum, 'price' => $totalPrice, 'totalItemNum' => $totalItemNum];
|
|
|
+ return ['product' => $data, 'totalReachDiscount' => $totalReachDiscount, 'smallNum' => $totalSmallNum,
|
|
|
+ 'bigNum' => $totalBigNum, 'price' => $totalPrice, 'totalItemNum' => $totalItemNum, 'totalCost' => $totalCost];
|
|
|
}
|
|
|
|
|
|
// //修改某个花材的成本价(采购之后要用到) lqh 2021.04.06
|