Commit 0e7d0082 authored by christ's avatar christ

pc

parent 66fd4dad
......@@ -1159,6 +1159,7 @@ class RefundServiceModel extends \Business\AbstractModel
$orderDao->db->doTransaction();
if($refund['refundType']==ApiConst::refundTypeGoods){
$refund['refundAmount']-=$orderInfo['needShippingFee'];
}
$whereRefund['goods_id']=$refund['goodsId'];
$whereRefund['buyer_id']=$memberId;
......@@ -1181,9 +1182,15 @@ class RefundServiceModel extends \Business\AbstractModel
$refundAmount = $refund['refundAmount'];//退款金额
if ($orderInfo['paymentTime']) {
$maxRefundAmount=$orderGoods['goodsPayPrice']*$orderGoods['goodsNum'];
if (($refundAmount < ApiConst::zero) || ($refundAmount > $maxRefundAmount)) {
if (($refundAmount < ApiConst::zero)) {
$refundAmount = ApiConst::zero;
}
if($refundAmount > $maxRefundAmount){
$refundAmount = $maxRefundAmount;
}
// if (($refundAmount < ApiConst::zero) || ($refundAmount > $maxRefundAmount)) {
// $refundAmount = $maxRefundAmount;
// }
} else {
$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