Merge pull request #31 from Danakcorp/mrtz

fix : total discount
This commit is contained in:
morteza-mortezai
2025-10-28 15:17:54 +03:30
committed by GitHub
+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 });