Commit 53159d64 authored by liuyuzhen's avatar liuyuzhen

折扣优惠券

parent 11ef5a8b
......@@ -381,7 +381,7 @@ class CouponModel extends \DAO\AbstractModel {
if($coupon['coupon_type'] ==\Our\ApiConst::fullMinusCouponType&&($totalPrice>\Our\ApiConst::zero&&$totalPrice>=$coupon['order_amount'])){ //指定品类满减券
$reliefAmount = $coupon['cash_money'];
}else if($coupon['coupon_type'] ==\Our\ApiConst::discountCouponType&&($totalPrice>=$coupon['order_amount']||$coupon['order_amount']==\Our\ApiConst::zero)){//指定品类折扣券,可能没有订单限制,或有订单金额限制
$reliefAmount = round($totalPrice * $coupon['discount']/\Our\ApiConst::ten,\Our\ApiConst::zero);
$reliefAmount = round($totalPrice * (\Our\ApiConst::ten-$coupon['discount'])/\Our\ApiConst::ten,\Our\ApiConst::zero);
}else if(($coupon['coupon_type']== \Our\ApiConst::fullForCouponCouponType)
&&($totalPrice>\Our\ApiConst::zero&&$totalPrice>=$coupon['order_amount'])){
$reliefAmount = \Our\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