|
|
@@ -984,7 +984,6 @@ class ProductClass extends BaseClass
|
|
|
$productId = $v['productId'];
|
|
|
$itemId = $productData[$productId]['itemId'] ?? 0;
|
|
|
$ratio = $productData[$productId]['ratio'] ?? 0;
|
|
|
- $ratioType = $productData[$productId]['ratioType'] ?? 0;
|
|
|
$smallRatio = $productData[$productId]['smallRatio'] ?? 1;
|
|
|
$cost = $productData[$productId]['cost'] ?? 0;
|
|
|
|
|
|
@@ -1056,10 +1055,10 @@ class ProductClass extends BaseClass
|
|
|
$xhUnitType = dict::getDict('unitType', 'small');
|
|
|
$xhNum = $smallNum;
|
|
|
$xhUnitName = $tmp['smallUnit'] ?? '';
|
|
|
- if ($ratioType == 0) {
|
|
|
- $smallCost = bcdiv($cost, $ratio, 2);
|
|
|
- $cost = $smallCost;
|
|
|
- }
|
|
|
+
|
|
|
+ $smallCost = bcdiv($cost, $ratio, 2);
|
|
|
+ $cost = $smallCost;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
$tmp['cost'] = $cost;
|