فهرست منبع

$currentCgItem

shish 4 سال پیش
والد
کامیت
7a5fd28023
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      biz-ghs/cg/services/CgRefundService.php

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

@@ -70,6 +70,12 @@ class CgRefundService extends BaseService
                 $totalNum = $currentCgItem->itemNum ?? 0;
                 $unitPrice = $currentCgItem->bigPrice ?? 0;
                 $unitName = $currentCgItem->bigUnit ?? '';
+
+                //已退数量增加
+                $currentRefundNum = bcadd($currentCgItem->refundNum, $num);
+                $currentCgItem->refundNum = $currentRefundNum;
+                $currentCgItem->save();
+
                 $totalPrice = bcmul($unitPrice, $num, 2);
                 $couldRefundNum = bcsub($totalNum, $hasRefundNum);
                 if ($couldRefundNum < $num) {