Commit 6f257773 authored by christ's avatar christ

refund

parent a70d43a4
...@@ -424,8 +424,8 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -424,8 +424,8 @@ class RefundServiceModel extends \Business\AbstractModel
//获取订单 //获取订单
$order_id = $refund['order_id']; $order_id = $refund['order_id'];
$order_info = $orderDao->find( array('order_id'=>$order_id)); $order_info = $orderDao->find( array('order_id'=>$order_id));
$alreadyRefund=$order_info['refund_amount']-$refundAmount;
if(($order_info['order_amount']-$order_info['refund_amount']+$refundAmount)<$refundAmount){ if(($order_info['order_amount']-$alreadyRefund)<$refundAmount){
ErrorModel::throwException(CodeConfigModel::beyongRefundAmount); ErrorModel::throwException(CodeConfigModel::beyongRefundAmount);
} }
if($refund['refund_type']==ApiConst::refundTypeGoods){ if($refund['refund_type']==ApiConst::refundTypeGoods){
......
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