shish 3 лет назад
Родитель
Сommit
4bce337d9e
1 измененных файлов с 4 добавлено и 5 удалено
  1. 4 5
      biz-ghs/product/classes/ProductClass.php

+ 4 - 5
biz-ghs/product/classes/ProductClass.php

@@ -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;