fix : total discount
This commit is contained in:
@@ -209,6 +209,7 @@ class CouponService {
|
|||||||
cartShipmentItem.totalCouponDiscount = discount;
|
cartShipmentItem.totalCouponDiscount = discount;
|
||||||
cartShipmentItem.totalPaymentPrice = cartShipmentItem.totalPaymentPrice - discount;
|
cartShipmentItem.totalPaymentPrice = cartShipmentItem.totalPaymentPrice - discount;
|
||||||
userCart.coupon_discount = discount;
|
userCart.coupon_discount = discount;
|
||||||
|
userCart.total_discount += discount;
|
||||||
coupon.usageCount += 1;
|
coupon.usageCount += 1;
|
||||||
|
|
||||||
await validCartShipmentItem.save({ session });
|
await validCartShipmentItem.save({ session });
|
||||||
|
|||||||
Reference in New Issue
Block a user