taxtank-core 0.28.103 → 0.28.105

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.
@@ -11765,6 +11765,9 @@
11765
11765
  this.otherDeductionsTotalAmount = this.transactions
11766
11766
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherDeductions)
11767
11767
  .sumBy('claimAmount');
11768
+ this.depreciationAndCapitalAllowancesTotalAmount = this.depreciations
11769
+ .filter(function (depreciation) { return !depreciation.isLVP(); })
11770
+ .sumBy('claimAmount');
11768
11771
  }
11769
11772
  MyTaxDeductions.prototype.getVehicleExpensesTotalAmount = function () {
11770
11773
  if (this.vehicleClaimDetails) {
@@ -11782,7 +11785,7 @@
11782
11785
  MyTaxDeductions.prototype.setOtherWorkRelatedExpensesTotalAmount = function () {
11783
11786
  var otherIncomeRelatedExpenses = this.transactions
11784
11787
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherIncomeRelatedExpenses);
11785
- this.otherWorkRelatedExpensesTotalAmount = -Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) +
11788
+ this.otherWorkRelatedExpensesTotalAmount = -Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) -
11786
11789
  this.depreciations.filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount');
11787
11790
  };
11788
11791
  MyTaxDeductions.prototype.calculateWorkRelatedSelfEducationTotalAmount = function () {
@@ -12014,23 +12017,22 @@
12014
12017
  function MyTaxPartnershipsAndTrusts(transactions, incomeSources) {
12015
12018
  this.transactions = transactions;
12016
12019
  this.incomeSources = incomeSources;
12017
- this.partnershipIncomes = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PARTNERSHIP_INCOME);
12018
- this.partnershipExpenses = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PARTNERSHIP_EXPENSES);
12020
+ this.partnershipsIncomes = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PARTNERSHIP_INCOME);
12021
+ this.partnershipsExpenses = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PARTNERSHIP_EXPENSES);
12019
12022
  this.trustsIncomes = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TRUST_INCOME);
12020
12023
  this.trustsExpenses = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TRUST_EXPENSES);
12021
- this.trustType = this.getTrustType();
12022
- this.netNonPrimaryProductionAmount = (this.partnershipIncomes.sumBy('amount') - this.partnershipExpenses.sumBy('amount')) +
12023
- (this.trustsIncomes.sumBy('amount') - this.trustsExpenses.sumBy('amount'));
12024
- this.partnershipsNetIncome = this.partnershipIncomes.sumBy('amount') -
12025
- this.partnershipExpenses.sumBy('amount');
12026
- this.trustsNetIncome = this.trustsIncomes.sumBy('amount') - this.trustsExpenses.sumBy('amount');
12027
- this.partnershipsSmallBusinessNetIncome = this.partnershipIncomes.sumBy('amount') -
12028
- this.partnershipExpenses.sumBy('amount');
12029
- this.trustsSmallBusinessNetIncome = this.trustsIncomes.sumBy('amount') -
12030
- this.trustsExpenses.sumBy('amount');
12031
- this.taxPaidTotal = this.transactions
12024
+ this.partnershipsIncomeTotalAmount = this.partnershipsIncomes.sumBy('amount');
12025
+ this.partnershipsExpenseTotalAmount = this.partnershipsExpenses.sumBy('amount');
12026
+ this.trustsIncomeTotalAmount = this.trustsIncomes.sumBy('amount');
12027
+ this.trustsExpenseTotalAmount = this.trustsExpenses.sumBy('amount');
12028
+ this.partnershipsNetNonPrimaryProductionAmount = this.partnershipsIncomeTotalAmount - this.partnershipsExpenseTotalAmount;
12029
+ this.trustsNetNonPrimaryProductionAmount = this.trustsIncomeTotalAmount - this.trustsExpenseTotalAmount;
12030
+ this.frankingCreditsTotal = this.transactions
12032
12031
  .filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingTaxableEnum.PARTNERSHIPS_AND_TRUSTS_INCOME)
12033
- .sumBy('tax');
12032
+ .getTransactionsMetadata()
12033
+ .filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.FRANKING_CREDIT)
12034
+ .sumBy('value');
12035
+ this.trustsIncomeTotalTax = this.trustsIncomes.sumBy('tax');
12034
12036
  this.frankingCreditsTotal = this.transactions
12035
12037
  .filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingTaxableEnum.PARTNERSHIPS_AND_TRUSTS_INCOME)
12036
12038
  .getTransactionsMetadata()
@@ -12038,22 +12040,6 @@
12038
12040
  .sumBy('value');
12039
12041
  this.taxOffsetNRASTotalAmount = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TAX_OFFSETS_N_R_A_S).sumBy('amount');
12040
12042
  }
12041
- /**
12042
- * Get Income source forecast trust type, related to trust income with max amount
12043
- */
12044
- MyTaxPartnershipsAndTrusts.prototype.getTrustType = function () {
12045
- var filteredTrustIncomes = this.trustsIncomes
12046
- .filterBy('incomeSource.id', this.incomeSources
12047
- .removeBy('actualForecast.trustType', null)
12048
- .getIds());
12049
- if (!filteredTrustIncomes.length) {
12050
- return null;
12051
- }
12052
- return this.incomeSources
12053
- .findBy('id', filteredTrustIncomes.maxBy('amount').incomeSource.id)
12054
- .actualForecast
12055
- .trustType;
12056
- };
12057
12043
  return MyTaxPartnershipsAndTrusts;
12058
12044
  }());
12059
12045
 
@@ -20375,6 +20361,10 @@
20375
20361
  otherDeductionsTotalAmount: new forms.FormControl({
20376
20362
  value: deductions.otherDeductionsTotalAmount,
20377
20363
  disabled: true
20364
+ }),
20365
+ depreciationAndCapitalAllowancesTotalAmount: new forms.FormControl({
20366
+ value: deductions.depreciationAndCapitalAllowancesTotalAmount,
20367
+ disabled: true
20378
20368
  })
20379
20369
  }) || this;
20380
20370
  return _this;
@@ -20625,21 +20615,24 @@
20625
20615
  __extends(MyTaxPartnershipsAndTrustsForm, _super);
20626
20616
  function MyTaxPartnershipsAndTrustsForm(partnershipsAndTrusts) {
20627
20617
  return _super.call(this, {
20628
- partnershipsNetIncome: new forms.FormControl({
20629
- value: partnershipsAndTrusts.partnershipsNetIncome,
20618
+ partnershipsIncomeTotalAmount: new forms.FormControl({
20619
+ value: partnershipsAndTrusts.partnershipsIncomeTotalAmount,
20620
+ disabled: true
20621
+ }),
20622
+ partnershipsExpenseTotalAmount: new forms.FormControl({
20623
+ value: partnershipsAndTrusts.partnershipsExpenseTotalAmount,
20624
+ disabled: true
20625
+ }),
20626
+ trustsIncomeTotalAmount: new forms.FormControl({
20627
+ value: partnershipsAndTrusts.trustsIncomeTotalAmount,
20630
20628
  disabled: true
20631
20629
  }),
20632
- trustsNetIncome: new forms.FormControl({
20633
- value: partnershipsAndTrusts.trustsNetIncome,
20630
+ trustsExpenseTotalAmount: new forms.FormControl({
20631
+ value: partnershipsAndTrusts.trustsExpenseTotalAmount,
20634
20632
  disabled: true
20635
20633
  }),
20636
- trustType: new forms.FormControl(partnershipsAndTrusts.trustType, conditionalValidator(function (control) {
20637
- return !!partnershipsAndTrusts.trustsIncomes.length;
20638
- }, forms.Validators.required)),
20639
- partnershipsSmallBusinessNetIncome: new forms.FormControl(partnershipsAndTrusts.partnershipsSmallBusinessNetIncome, forms.Validators.required),
20640
- trustsSmallBusinessNetIncome: new forms.FormControl(partnershipsAndTrusts.trustsSmallBusinessNetIncome, forms.Validators.required),
20641
- taxPaidTotal: new forms.FormControl({
20642
- value: partnershipsAndTrusts.taxPaidTotal,
20634
+ trustsIncomeTotalTax: new forms.FormControl({
20635
+ value: partnershipsAndTrusts.trustsIncomeTotalTax,
20643
20636
  disabled: true
20644
20637
  }),
20645
20638
  frankingCreditsTotal: new forms.FormControl({