taxtank-core 0.30.85 → 0.30.87

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.
@@ -1269,7 +1269,7 @@ class Bank extends Bank$1 {
1269
1269
  if (!this.logo) {
1270
1270
  return null;
1271
1271
  }
1272
- return this.logo.includes('http') ? `${this.logo}` : `${localStorage.getItem('api_uri')}/${this.logo}`;
1272
+ return this.logo.includes('http') ? `${this.logo}` : `${localStorage.getItem('api_uri')}${this.logo}`;
1273
1273
  }
1274
1274
  }
1275
1275
  __decorate([
@@ -1934,9 +1934,12 @@ class ServicePrice extends ServicePrice$1 {
1934
1934
  isAnnual() {
1935
1935
  return [ServicePriceTypeEnum.YEARLY, ServicePriceTypeEnum.YEARLY_PACKAGE].includes(this.type);
1936
1936
  }
1937
+ isPackage() {
1938
+ return [ServicePriceTypeEnum.MONTHLY_PACKAGE, ServicePriceTypeEnum.YEARLY_PACKAGE].includes(this.type);
1939
+ }
1937
1940
  discountPrice(promoCode) {
1938
- const discountAmount = this.amount - this.amount * (promoCode.percentOff / 100);
1939
- return discountAmount;
1941
+ // @TODO why only percent type?
1942
+ return this.amount - this.amount * (promoCode.percentOff / 100);
1940
1943
  }
1941
1944
  }
1942
1945
  __decorate([
@@ -7395,7 +7398,13 @@ class ServiceSubscription extends ServiceSubscription$1 {
7395
7398
  hasProduct(product) {
7396
7399
  return !!this.items.find((item) => item.price.product.id === product.id);
7397
7400
  }
7401
+ /**
7402
+ * package might have not all products, if it's purchased before release of the new product
7403
+ */
7398
7404
  isPackage() {
7405
+ return this.getItems().prices.first?.isPackage();
7406
+ }
7407
+ isFullPackage() {
7399
7408
  return this.items.length === ServiceProduct.quantity;
7400
7409
  }
7401
7410
  isAnnual() {