Skip to content

Commit

Permalink
remove old comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wsethbrown committed Nov 2, 2023
1 parent 7510b22 commit cd50872
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions lib/recurly/pricing/checkout/calculations.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ export default class Calculations {
this.price.next.discount = discountNext;
}

// return promise.then(() => {
// if (coupon.single_use) this.price.next.discount = 0;
// });

return promise;
}

Expand Down Expand Up @@ -331,6 +327,7 @@ export default class Calculations {
*
* @return {Object} { discountNow, discountNext }
*/

discountAmounts () {
const coupon = this.items.coupon;
let discountNow = 0;
Expand Down Expand Up @@ -358,27 +355,6 @@ export default class Calculations {
return { discountNow, discountNext };
}

// discountAmounts () {
// const coupon = this.items.coupon;
// let discountNow = 0;
// let discountNext = 0;
// if (coupon) {
// if (coupon.discount.type === 'free_trial') {
// // Amounts are left zero
// } else if (coupon.discount.rate) {
// const { discountableNow, discountableNext } = this.discountableSubtotals(coupon, { setupFees: false });
// discountNow = roundForDiscount(discountableNow * coupon.discount.rate);
// discountNext = roundForDiscount(discountableNext * coupon.discount.rate);
// } else if (coupon.discount.amount) {
// const { discountableNow, discountableNext } = this.discountableSubtotals(coupon);
// // Falls back to zero if the coupon does not support the checkout currency
// const discountAmount = coupon.discount.amount[this.items.currency] || 0;
// discountNow = Math.min(discountableNow, discountAmount);
// discountNext = Math.min(discountableNext, discountAmount);
// }
// }
// return { discountNow, discountNext };
// }
/**
* Computes the discountable subtotals for a given coupon
*
Expand Down

0 comments on commit cd50872

Please sign in to comment.