feat(refill): overhaul subscription model to Smart Course Reservation & 5% Next-Order Loyalty Voucher reward
This commit is contained in:
1 parent
b5650c4cbb
commit
85d5a11a5e
7 files changed
+79
-24
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user