feat(refill): overhaul subscription model to Smart Course Reservation & 5% Next-Order Loyalty Voucher reward

This commit is contained in:
parsa aghaei committed 2026-07-27 11:46:45 +03:30
1 parent b5650c4cbb
commit 85d5a11a5e
7 files changed
+79 -24

No files matched your search

+1 -7
View File
@@ -106,14 +106,8 @@ export class OrdersService {
}
}
// Apply Refill 5% discount if requested
let refillDiscount = 0;
if (createOrderDto.isRefill) {
refillDiscount = totalAmount * 0.05;
}
const charityAmount = Number(createOrderDto.charityDonation || 0);
const finalAmount = Math.max(totalAmount - discountAmount - refillDiscount + charityAmount, 0);
const finalAmount = Math.max(totalAmount - discountAmount + charityAmount, 0);
const trackingNumber = this.generateTrackingNumber();
// Deduct user wallet balance if payment method is wallet