fix : cart total_discount

This commit is contained in:
morteza-mortezai
2025-10-28 17:27:06 +03:30
parent 3e8f6a3ea5
commit 76c0e6a83e
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -209,7 +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 });