rabin 2 年之前
父節點
當前提交
9065c4b7ef
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      app/shop/lib/Refund.php

+ 6 - 1
app/shop/lib/Refund.php

@@ -433,7 +433,12 @@ class Refund
             $re_cash = $info['re_cash'];
             if (isset($order['card_code_id']) && $order['card_code_id'] && $order['card_code_cash'] > 0) {
                 # 还原礼品卡
-                $card_cash = $order['card_code_cash'];
+                if ($re_cash > 0) {
+                    $card_cash = $re_cash;
+                } else {
+                    $card_cash = $order['card_code_cash'];
+                }
+                
                 if ($re_cash > 0) {
                     $card_code_cash = $order['card_code_cash'] - $re_cash;
                     $order['card_code_cash'] = $re_cash;