From cd5087296d0bb15ba2b84c51676f28fe7980c8f2 Mon Sep 17 00:00:00 2001 From: Seth Brown Date: Thu, 2 Nov 2023 17:05:39 -0400 Subject: [PATCH] remove old comments --- lib/recurly/pricing/checkout/calculations.js | 26 +------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/lib/recurly/pricing/checkout/calculations.js b/lib/recurly/pricing/checkout/calculations.js index 9aa7401af..61725a955 100644 --- a/lib/recurly/pricing/checkout/calculations.js +++ b/lib/recurly/pricing/checkout/calculations.js @@ -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; } @@ -331,6 +327,7 @@ export default class Calculations { * * @return {Object} { discountNow, discountNext } */ + discountAmounts () { const coupon = this.items.coupon; let discountNow = 0; @@ -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 *