taxtank-core 1.0.4 → 1.0.5

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.
@@ -6782,7 +6782,7 @@ class Depreciation extends Depreciation$1 {
6782
6782
  && !this.isSBPCalculation()
6783
6783
  && this.isDiminishing()
6784
6784
  && !this.isWrittenOff()
6785
- && this.currentYearForecast.closeBalance <= Depreciation.lowValuePoolThreshold;
6785
+ && this.currentYearForecast.openBalance <= Depreciation.lowValuePoolThreshold;
6786
6786
  }
6787
6787
  isSBP() {
6788
6788
  return this.isAsset() && this.isSBPCalculation() && !this.isWrittenOff();
@@ -6888,7 +6888,7 @@ __decorate([
6888
6888
  // @TODO refactor
6889
6889
  value.forEach((forecast) => {
6890
6890
  forecast.isLVP =
6891
- forecast.closeBalance < 1000 &&
6891
+ forecast.openBalance < 1000 &&
6892
6892
  obj.calculation === DepreciationCalculationEnum.DIMINISHING &&
6893
6893
  obj.type === DepreciationTypeEnum.PLANT_EQUIPMENT &&
6894
6894
  !(obj.amount > Depreciation.writtenOffThreshold && obj.amount < Depreciation.lowValuePoolThreshold) &&
@@ -13428,11 +13428,11 @@ class RestService {
13428
13428
  /**
13429
13429
  * get list of base class instances directly from backend
13430
13430
  */
13431
- fetch(path = this.apiUrl, cache = true) {
13431
+ fetch(path = this.apiUrl, cache = true, params = {}) {
13432
13432
  if (cache) {
13433
13433
  this.setCache([]);
13434
13434
  }
13435
- return this.http.get(path)
13435
+ return this.http.get(path, { params: params })
13436
13436
  .pipe(map((response) => {
13437
13437
  const items = response.map((item) => this.createModelInstance(item));
13438
13438
  if (cache) {
@@ -15821,8 +15821,8 @@ class TransactionService extends RestService {
15821
15821
  getPropertyHoldingCosts(propertyId) {
15822
15822
  return this.fetch(`${this.environment.apiV2}/properties/${propertyId}/holding-costs`, false);
15823
15823
  }
15824
- getWithoutTaxFreeProperty() {
15825
- return this.fetch(`${this.apiUrl}?excludeTaxFreePropertyCategories`, false).pipe(map(transactions => this.groupByParent(transactions)));
15824
+ getWithoutTaxFreeProperty(categories = ['']) {
15825
+ return this.fetch(`${this.apiUrl}`, false, { excludeTaxFreePropertyCategories: categories }).pipe(map(transactions => this.groupByParent(transactions)));
15826
15826
  }
15827
15827
  groupByParent(transactions) {
15828
15828
  transactions.forEach((transaction) => {
@@ -20073,7 +20073,7 @@ class PropertyTransactionReportService {
20073
20073
  */
20074
20074
  getTransactions() {
20075
20075
  // @TODO TT-4886
20076
- return this.transactionService.getWithoutTaxFreeProperty().pipe(map((transactions) => new TransactionCollection(transactions)
20076
+ return this.transactionService.getWithoutTaxFreeProperty([PropertyCategoryListEnum.VACANT_LAND]).pipe(map((transactions) => new TransactionCollection(transactions)
20077
20077
  .getByChartAccountsCategories(CHART_ACCOUNTS_CATEGORIES.property)
20078
20078
  .filter(transaction => transaction.claimPercent > 0)));
20079
20079
  }