|
|
@@ -83,8 +83,7 @@ class PurchaseOrderClass extends BaseClass
|
|
|
$productId = $cgItem['productId'] ?? 0;
|
|
|
$currentNum = $cgItem['itemNum'] ?? 0;
|
|
|
$ptItemId = $cgItem['itemId'] ?? 0;
|
|
|
- $bigPrice = $cgItem['bigPrice'] ?? 0;
|
|
|
- $bigFreight = $cgItem['bigFreight'] ?? 0;
|
|
|
+ $unitCost = $cgItem['cost'] ?? 0;
|
|
|
|
|
|
$product = ProductClass::getLockById($productId);
|
|
|
if (empty($product)) {
|
|
|
@@ -106,7 +105,6 @@ class PurchaseOrderClass extends BaseClass
|
|
|
$record['newStock'] = $stockInfo['newStock'];
|
|
|
StockRecordClass::addPurchaseOrderRecord($record);
|
|
|
|
|
|
- $unitCost = bcadd($bigPrice, $bigFreight, 2);
|
|
|
$product->cost = $unitCost;
|
|
|
$product->priceLabel = ProductClass::PRICE_LABEL_AUTO;
|
|
|
$product->save();
|