Commit 0e7d0082 authored by christ's avatar christ

pc

parent 66fd4dad
...@@ -1159,6 +1159,7 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1159,6 +1159,7 @@ class RefundServiceModel extends \Business\AbstractModel
$orderDao->db->doTransaction(); $orderDao->db->doTransaction();
if($refund['refundType']==ApiConst::refundTypeGoods){ if($refund['refundType']==ApiConst::refundTypeGoods){
$refund['refundAmount']-=$orderInfo['needShippingFee']; $refund['refundAmount']-=$orderInfo['needShippingFee'];
} }
$whereRefund['goods_id']=$refund['goodsId']; $whereRefund['goods_id']=$refund['goodsId'];
$whereRefund['buyer_id']=$memberId; $whereRefund['buyer_id']=$memberId;
...@@ -1181,9 +1182,15 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1181,9 +1182,15 @@ class RefundServiceModel extends \Business\AbstractModel
$refundAmount = $refund['refundAmount'];//退款金额 $refundAmount = $refund['refundAmount'];//退款金额
if ($orderInfo['paymentTime']) { if ($orderInfo['paymentTime']) {
$maxRefundAmount=$orderGoods['goodsPayPrice']*$orderGoods['goodsNum']; $maxRefundAmount=$orderGoods['goodsPayPrice']*$orderGoods['goodsNum'];
if (($refundAmount < ApiConst::zero) || ($refundAmount > $maxRefundAmount)) { if (($refundAmount < ApiConst::zero)) {
$refundAmount = ApiConst::zero;
}
if($refundAmount > $maxRefundAmount){
$refundAmount = $maxRefundAmount; $refundAmount = $maxRefundAmount;
} }
// if (($refundAmount < ApiConst::zero) || ($refundAmount > $maxRefundAmount)) {
// $refundAmount = $maxRefundAmount;
// }
} else { } else {
$refundAmount = ApiConst::zero; $refundAmount = ApiConst::zero;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment