fix : total discount

This commit is contained in:
morteza-mortezai
2025-10-28 15:16:29 +03:30
parent 0672103465
commit f0ccb5e025
+1
View File
@@ -209,6 +209,7 @@ class CouponService {
cartShipmentItem.totalCouponDiscount = discount;
cartShipmentItem.totalPaymentPrice = cartShipmentItem.totalPaymentPrice - discount;
userCart.coupon_discount = discount;
userCart.total_discount += discount;
coupon.usageCount += 1;
await validCartShipmentItem.save({ session });