|
|
@@ -62,7 +62,9 @@ class StockOutOrderClass extends BaseClass
|
|
|
foreach ($batchData as $outKey => $outVal) {
|
|
|
$batchData[$outKey]['mainId'] = $outMainId;
|
|
|
$batchData[$outKey]['shopId'] = $outShopId;
|
|
|
- $currentCost = $outVal['itemPrice'] ?? 0;
|
|
|
+ $unitCost = $outVal['itemPrice'] ?? 0;
|
|
|
+ $currentNum = $outVal['itemNum'] ?? 0;
|
|
|
+ $currentCost = bcmul($unitCost, $currentNum, 2);
|
|
|
$totalCost = bcadd($totalCost, $currentCost, 2);
|
|
|
}
|
|
|
StockOutOrderItemClass::batchAddOrderItem($batchData);
|