|
|
@@ -76,8 +76,7 @@ class RefundOrderService extends BaseService
|
|
|
$num = $currentProduct['num'] ?? 0;
|
|
|
$xhUnitName = $currentProduct['unitName'] ?? '';
|
|
|
$xhUnitPrice = $currentProduct['unitPrice'] ?? '';
|
|
|
- //$unitType = $currentProduct['unitType'] ?? 0;
|
|
|
- $unitType = self::getUnitType($xhUnitName);
|
|
|
+ $unitType = $currentProduct['unitType'] ?? 0;
|
|
|
|
|
|
$xhPrice = bcmul($num, $xhUnitPrice, 2);
|
|
|
|
|
|
@@ -274,22 +273,4 @@ class RefundOrderService extends BaseService
|
|
|
|
|
|
return $refund;
|
|
|
}
|
|
|
-
|
|
|
- private static function getUnitType($unitName)
|
|
|
- {
|
|
|
- if (empty($unitName)) {
|
|
|
- util::fail('单位名称不正确');
|
|
|
- }
|
|
|
-
|
|
|
- if ($unitName == '支') {
|
|
|
- return dict::getDict('unitType', 'small');
|
|
|
- }
|
|
|
-
|
|
|
- if ($unitName == '扎' || $unitName == '盒') {
|
|
|
- return dict::getDict('unitType', 'big');
|
|
|
- }
|
|
|
-
|
|
|
- util::fail($unitName . ' - 单位名称不存在');
|
|
|
- }
|
|
|
-
|
|
|
}
|