瀏覽代碼

处理 满赠导致的旧版本红包扣款额度不对

stanley-king 8 年之前
父節點
當前提交
f06bf33e09
共有 1 個文件被更改,包括 1 次插入11 次删除
  1. 1 11
      data/logic/payment.logic.php

+ 1 - 11
data/logic/payment.logic.php

@@ -109,7 +109,6 @@ class paymentLogic
         $pd_amount = $mod_member->getPdAmount($member_id);
         $avail_pred = $pd_amount;
 
-
         $order_list = $model_order->getNormalOrderList(array('pay_sn' => $pay_sn));
         $pred_helper = new predeposit_helper($member_id);
         $pd_amount = intval($pd_amount * 100 + 0.5);
@@ -118,12 +117,8 @@ class paymentLogic
         $can_used = 0;
         foreach ($order_list as $order_info)
         {
-            // 计算运费+订单总额
-            $cur_order_amount = intval(floatval($order_info['order_amount']) * 100 + 0.5);
-            $cur_pd_amount = intval(floatval($order_info['pd_amount']) * 100 + 0.5);
-            $used_pred += $cur_pd_amount;
+            $order_pd_amount = $pred_helper->calc_pred($order_info, $pd_amount, $no_cash);
 
-            $order_pd_amount = $pred_helper->calc_pred($cur_order_amount, $pd_amount, $cur_pd_amount, $no_cash);
             $pd_amount -= $order_pd_amount;
             $can_used  += $order_pd_amount;
         }
@@ -162,11 +157,6 @@ class paymentLogic
             $pd_amount = intval($pd_amount * 100 + 0.5);
             foreach ($order_list as $order_info)
             {
-//                $cur_order_amount = intval(floatval($order_info['order_amount']) * 100 + 0.5);
-//                $cur_pd_amount = intval(floatval($order_info['pd_amount']) * 100 + 0.5);
-//                $order_pd_amount = $pred_helper->calc_pred($cur_order_amount,$pd_amount,$cur_pd_amount,$no_cash);
-//                $pd_amount -= $order_pd_amount;
-
                 $order_pd_amount = $pred_helper->calc_pred($order_info,$pd_amount,$no_cash);
                 $pd_amount -= $order_pd_amount;