shish 1 yıl önce
ebeveyn
işleme
072abd7d75
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      biz-hd/cg/services/CgRefundService.php

+ 6 - 0
biz-hd/cg/services/CgRefundService.php

@@ -212,6 +212,11 @@ class CgRefundService extends BaseService
                 $currentPrice = bcmul($num,$unitPrice,2);
                 $originPrice = bcadd($originPrice,$currentPrice,2);
 
+                $itemNum = $num;
+                if ($unitType == dict::getDict('unitType', 'small')) {
+                    $itemNum = bcdiv($num, $ratio, 2);
+                }
+
                 $refundData = [];
                 $refundData['orderSn'] = $refundOrderSn;
                 $refundData['itemId'] = $ptItemId;
@@ -224,6 +229,7 @@ class CgRefundService extends BaseService
                 $refundData['shopId'] = $shopId;
                 $refundData['sjId'] = $sjId;
                 $refundData['xhNum'] = $num;
+                $refundData['itemNum'] = $itemNum;
                 $refundData['xhUnitName'] = $unitName;
                 $refundData['xhUnitType'] = $unitType;
                 $refundData['xhUnitPrice'] = $unitPrice;