taxtank-core 1.0.47 → 1.0.48

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.
@@ -8054,8 +8054,8 @@ class MyTaxRent {
8054
8054
  .getIncomeTransactions()
8055
8055
  .filterBy('chartAccounts.id', [ChartAccountsListEnum.RENTAL_INCOME, ChartAccountsListEnum.OTHER_RENTAL_INCOME])
8056
8056
  .getGrossClaimAmountWithoutGst();
8057
- this.interestDeductionsAmount = Math.abs(transactions.getInterestTransactions().sumBy('claimAmount'));
8058
- this.capitalWorksDeductionsAmount = Math.abs(depreciations.getCapitalDepreciations().sumBy('claimAmount'));
8057
+ this.interestDeductionsAmount = transactions.getInterestTransactions().sumBy('claimAmount');
8058
+ this.capitalWorksDeductionsAmount = -depreciations.getCapitalDepreciations().sumBy('claimAmount');
8059
8059
  this.otherRentalDeductionsAmount = this.calculateOtherRentalDeductionsAmount();
8060
8060
  /**
8061
8061
  * @Todo Vik uncomment when task TT-2009 will be implemented
@@ -8064,9 +8064,9 @@ class MyTaxRent {
8064
8064
  // depreciations.getByTankType(TankTypeEnum.PROPERTY).getBorrowingExpenseDepreciations().claimAmount +
8065
8065
  // Math.abs(this.propertyExpenses.sumBy('claimAmount'));
8066
8066
  this.netRent = this.grossRentAmount -
8067
- this.interestDeductionsAmount -
8068
- this.capitalWorksDeductionsAmount -
8069
- this.otherRentalDeductionsAmount;
8067
+ Math.abs(this.interestDeductionsAmount) -
8068
+ Math.abs(this.capitalWorksDeductionsAmount) -
8069
+ Math.abs(this.otherRentalDeductionsAmount);
8070
8070
  }
8071
8071
  /**
8072
8072
  * @Todo Vik remove when TT-2009 will be implemented.
@@ -8075,12 +8075,12 @@ class MyTaxRent {
8075
8075
  * property contract date, e.t.c.). Details in the TT-2009 task
8076
8076
  */
8077
8077
  calculateOtherRentalDeductionsAmount() {
8078
- const plantAndEquipmentAmount = Math.abs(this.taxSummaryPropertySection.items
8079
- .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.PLANT_AND_EQUIPMENT)?.amount || 0);
8080
- const borrowingExpensesAmount = Math.abs(this.taxSummaryPropertySection.items
8081
- .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.BORROWING_EXPENSES)?.amount || 0);
8082
- const otherRentalDeductionsAmount = Math.abs(this.taxSummaryPropertySection.items
8083
- .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.OTHER_RENTAL_DEDUCTIONS)?.amount || 0);
8078
+ const plantAndEquipmentAmount = this.taxSummaryPropertySection.items
8079
+ .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.PLANT_AND_EQUIPMENT)?.amount || 0;
8080
+ const borrowingExpensesAmount = this.taxSummaryPropertySection.items
8081
+ .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.BORROWING_EXPENSES)?.amount || 0;
8082
+ const otherRentalDeductionsAmount = this.taxSummaryPropertySection.items
8083
+ .findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.OTHER_RENTAL_DEDUCTIONS)?.amount || 0;
8084
8084
  return round(plantAndEquipmentAmount + borrowingExpensesAmount + otherRentalDeductionsAmount, 2);
8085
8085
  }
8086
8086
  }
@@ -8619,6 +8619,9 @@ class ServiceSubscriptionCollection extends Collection {
8619
8619
  filterByRole(role) {
8620
8620
  return this.filter((subscription) => subscription.roles.includes(role));
8621
8621
  }
8622
+ filterByRoles(roles) {
8623
+ return this.filter((subscription) => subscription.roles.some(r => roles.includes(r)));
8624
+ }
8622
8625
  findByRole(role) {
8623
8626
  return this.filterByRole(role).first;
8624
8627
  }
@@ -15683,6 +15686,15 @@ class TaxSummary {
15683
15686
  .findByCategory(TaxReturnCategoryListEnum.BUSINESS_INCOME_OR_LOSS).items
15684
15687
  .findBy('title', `Item 15c - ${business.name}`)?.amount;
15685
15688
  }
15689
+ get capitalGainsProperty() {
15690
+ return this.capitalGains.items.first.items.findBy('title', 'Property Tank')?.amount ?? 0;
15691
+ }
15692
+ get capitalGainsHoldings() {
15693
+ return this.capitalGains.items.first.items.findBy('title', 'Holdings Tank')?.amount ?? 0;
15694
+ }
15695
+ get capitalGainsNetCash() {
15696
+ return this.capitalGainsProperty + this.capitalGainsHoldings;
15697
+ }
15686
15698
  }
15687
15699
  __decorate([
15688
15700
  Type(() => TaxSummarySection)