Browse Source

使用成本计算

shish 9 months ago
parent
commit
76dd314336
1 changed files with 2 additions and 2 deletions
  1. 2 2
      biz-ghs/order/classes/PurchaseOrderClass.php

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

@@ -547,7 +547,7 @@ class PurchaseOrderClass extends BaseClass
             $ptItemId = $cgItem['itemId'] ?? 0;
             $unitCost = $cgItem['cost'] ?? 0;
             $presell = $cgItem['presell'] ?? 0;
-            $bigPrice = $cgItem['bigPrice'] ?? 0;
+            $currentCost = $cgItem['cost'] ?? 0;
 
             $product = ProductClass::getLockById($productId);
             if (empty($product)) {
@@ -557,7 +557,7 @@ class PurchaseOrderClass extends BaseClass
             if ($presell == 0) {
 
                 //加库存和流水记录
-                $stockInfo = ProductClass::addStockByItemNum($productId, $currentNum, ['cost' => $bigPrice]);
+                $stockInfo = ProductClass::addStockByItemNum($productId, $currentNum, ['cost' => $currentCost]);
                 $record = [];
                 $record['sjId'] = $sjId;
                 $record['shopId'] = $shopId;