Coupon % calculation refined

This commit is contained in:
Vion 2022-01-24 18:17:07 +08:00
parent de8d67fc51
commit cab59567e8

View File

@ -290,8 +290,8 @@ export default {
break;
case 3: //Limited product % discount
case 4: //% discount
total = total + (itemInCart.productPrice * itemInCart.buyCount) * (1-this.curCoupon.discount);
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
total = total + (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount);
couponUsed=true;
break;
default: