taxtank-core 1.0.56 → 1.0.57
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.
@@ -3484,8 +3484,10 @@ class ChartAccounts extends ChartAccounts$1 {
|
|
3484
3484
|
.includes(this.category);
|
3485
3485
|
}
|
3486
3486
|
isSoleExpense() {
|
3487
|
-
return [ChartAccountsCategoryEnum.SOLE_EXPENSE, ChartAccountsCategoryEnum.SOLE_DEPRECIATION]
|
3488
|
-
|
3487
|
+
return [ChartAccountsCategoryEnum.SOLE_EXPENSE, ChartAccountsCategoryEnum.SOLE_DEPRECIATION].includes(this.category);
|
3488
|
+
}
|
3489
|
+
isHoldingExpense() {
|
3490
|
+
return [ChartAccountsCategoryEnum.HOLDING_EXPENSE].includes(this.category);
|
3489
3491
|
}
|
3490
3492
|
/**
|
3491
3493
|
* Check if chart accounts is property expense
|
@@ -3541,7 +3543,7 @@ class ChartAccounts extends ChartAccounts$1 {
|
|
3541
3543
|
* except when taxablePercent=0, but not ENTERTAINMENT
|
3542
3544
|
*/
|
3543
3545
|
isClaimPercentEditable() {
|
3544
|
-
return ((this.isWorkExpense() || this.isSoleExpense()) && !this.isVehicleExpense() && this.taxablePercent > 0)
|
3546
|
+
return ((this.isWorkExpense() || this.isSoleExpense() || this.isHoldingExpense()) && !this.isVehicleExpense() && this.taxablePercent > 0)
|
3545
3547
|
|| this.id === BusinessChartAccountsEnum.ENTERTAINMENT;
|
3546
3548
|
}
|
3547
3549
|
/**
|
@@ -9137,7 +9139,8 @@ class BankAccountCollection extends Collection {
|
|
9137
9139
|
return this.filterBy('type', TYPE_LOAN);
|
9138
9140
|
}
|
9139
9141
|
getLoanAndOffsetAccounts() {
|
9140
|
-
|
9142
|
+
// @TODO we have to add TRANSACTION/SAVINGS because basiq doesn't provide offset type
|
9143
|
+
return this.filterBy('type', [...TYPE_LOAN, BankAccountTypeEnum.OFFSET, BankAccountTypeEnum.TRANSACTION, BankAccountTypeEnum.SAVINGS]);
|
9141
9144
|
}
|
9142
9145
|
getDebitAccounts() {
|
9143
9146
|
return this.filter(bankAccount => ![...TYPE_LOAN, BankAccountTypeEnum.CREDIT_CARD].includes(bankAccount.type));
|
@@ -15656,12 +15659,25 @@ class TaxSummary {
|
|
15656
15659
|
return this.getReportItems([this.work, this.property, this.sole, this.holdings]).sumByCategories([
|
15657
15660
|
...TAX_RETURN_CATEGORIES.work.expenses,
|
15658
15661
|
...TAX_RETURN_CATEGORIES.property.expenses,
|
15662
|
+
TaxReturnCategoryListEnum.BORROWING_EXPENSES,
|
15663
|
+
...TAX_RETURN_CATEGORIES.property.interest,
|
15664
|
+
...TAX_RETURN_CATEGORIES.property.depreciation,
|
15659
15665
|
...TAX_RETURN_CATEGORIES.sole.expenses,
|
15666
|
+
...TAX_RETURN_CATEGORIES.sole.depreciation,
|
15667
|
+
...TAX_RETURN_CATEGORIES.sole.loss,
|
15660
15668
|
...TAX_RETURN_CATEGORIES.holdings.expenses,
|
15661
15669
|
]);
|
15662
15670
|
}
|
15671
|
+
get taxCredits() {
|
15672
|
+
return this.summary.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.summary.taxCredits, TaxSummarySectionEnum.SUMMARY);
|
15673
|
+
}
|
15674
|
+
get depreciation() {
|
15675
|
+
return this.sole.items.sumByCategories(TAX_RETURN_CATEGORIES.sole.depreciation)
|
15676
|
+
+ this.property.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.property.depreciation, TaxSummarySectionEnum.PROPERTY_TANK)
|
15677
|
+
+ this.workDepreciations;
|
15678
|
+
}
|
15663
15679
|
get netCash() {
|
15664
|
-
return this.
|
15680
|
+
return this.income + this.expense + this.taxCredits - this.depreciation;
|
15665
15681
|
}
|
15666
15682
|
get netTotal() {
|
15667
15683
|
return this.workNetTotal + this.propertyNetTotal + this.soleNetTotal + this.holdingsNetTotal;
|