taxtank-core 0.30.14 → 0.30.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6658,12 +6658,14 @@ class ServiceSubscription extends ServiceSubscription$1 {
6658
6658
  return !!this.stripeId;
6659
6659
  }
6660
6660
  get price() {
6661
- const price = this.items.reduce((sum, item) => sum + item.total, 0);
6661
+ let price = this.items.reduce((sum, item) => sum + item.total, 0);
6662
6662
  if (!!this.stripePromoCode) {
6663
6663
  if (this.stripePromoCode.isAmount()) {
6664
- return price - this.stripePromoCode.amountOff;
6664
+ price = price - this.stripePromoCode.amountOff;
6665
+ }
6666
+ else {
6667
+ price = price - price * (this.stripePromoCode.percentOff / 100);
6665
6668
  }
6666
- return price - price * (this.stripePromoCode.percentOff / 100);
6667
6669
  }
6668
6670
  // promo code can't make price < 0
6669
6671
  return price > 0 ? price : 0;