taxtank-core 0.28.104 → 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.
@@ -12017,23 +12017,22 @@
12017
12017
  function MyTaxPartnershipsAndTrusts(transactions, incomeSources) {
12018
12018
  this.transactions = transactions;
12019
12019
  this.incomeSources = incomeSources;
12020
- this.partnershipIncomes = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.PARTNERSHIP_INCOME);
12021
- 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);
12022
12022
  this.trustsIncomes = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TRUST_INCOME);
12023
12023
  this.trustsExpenses = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TRUST_EXPENSES);
12024
- this.trustType = this.getTrustType();
12025
- this.netNonPrimaryProductionAmount = (this.partnershipIncomes.sumBy('amount') - this.partnershipExpenses.sumBy('amount')) +
12026
- (this.trustsIncomes.sumBy('amount') - this.trustsExpenses.sumBy('amount'));
12027
- this.partnershipsNetIncome = this.partnershipIncomes.sumBy('amount') -
12028
- this.partnershipExpenses.sumBy('amount');
12029
- this.trustsNetIncome = this.trustsIncomes.sumBy('amount') - this.trustsExpenses.sumBy('amount');
12030
- this.partnershipsSmallBusinessNetIncome = this.partnershipIncomes.sumBy('amount') -
12031
- this.partnershipExpenses.sumBy('amount');
12032
- this.trustsSmallBusinessNetIncome = this.trustsIncomes.sumBy('amount') -
12033
- this.trustsExpenses.sumBy('amount');
12034
- 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
12035
12031
  .filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingTaxableEnum.PARTNERSHIPS_AND_TRUSTS_INCOME)
12036
- .sumBy('tax');
12032
+ .getTransactionsMetadata()
12033
+ .filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.FRANKING_CREDIT)
12034
+ .sumBy('value');
12035
+ this.trustsIncomeTotalTax = this.trustsIncomes.sumBy('tax');
12037
12036
  this.frankingCreditsTotal = this.transactions
12038
12037
  .filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingTaxableEnum.PARTNERSHIPS_AND_TRUSTS_INCOME)
12039
12038
  .getTransactionsMetadata()
@@ -12041,22 +12040,6 @@
12041
12040
  .sumBy('value');
12042
12041
  this.taxOffsetNRASTotalAmount = this.transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.TAX_OFFSETS_N_R_A_S).sumBy('amount');
12043
12042
  }
12044
- /**
12045
- * Get Income source forecast trust type, related to trust income with max amount
12046
- */
12047
- MyTaxPartnershipsAndTrusts.prototype.getTrustType = function () {
12048
- var filteredTrustIncomes = this.trustsIncomes
12049
- .filterBy('incomeSource.id', this.incomeSources
12050
- .removeBy('actualForecast.trustType', null)
12051
- .getIds());
12052
- if (!filteredTrustIncomes.length) {
12053
- return null;
12054
- }
12055
- return this.incomeSources
12056
- .findBy('id', filteredTrustIncomes.maxBy('amount').incomeSource.id)
12057
- .actualForecast
12058
- .trustType;
12059
- };
12060
12043
  return MyTaxPartnershipsAndTrusts;
12061
12044
  }());
12062
12045
 
@@ -20632,21 +20615,24 @@
20632
20615
  __extends(MyTaxPartnershipsAndTrustsForm, _super);
20633
20616
  function MyTaxPartnershipsAndTrustsForm(partnershipsAndTrusts) {
20634
20617
  return _super.call(this, {
20635
- partnershipsNetIncome: new forms.FormControl({
20636
- 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,
20637
20628
  disabled: true
20638
20629
  }),
20639
- trustsNetIncome: new forms.FormControl({
20640
- value: partnershipsAndTrusts.trustsNetIncome,
20630
+ trustsExpenseTotalAmount: new forms.FormControl({
20631
+ value: partnershipsAndTrusts.trustsExpenseTotalAmount,
20641
20632
  disabled: true
20642
20633
  }),
20643
- trustType: new forms.FormControl(partnershipsAndTrusts.trustType, conditionalValidator(function (control) {
20644
- return !!partnershipsAndTrusts.trustsIncomes.length;
20645
- }, forms.Validators.required)),
20646
- partnershipsSmallBusinessNetIncome: new forms.FormControl(partnershipsAndTrusts.partnershipsSmallBusinessNetIncome, forms.Validators.required),
20647
- trustsSmallBusinessNetIncome: new forms.FormControl(partnershipsAndTrusts.trustsSmallBusinessNetIncome, forms.Validators.required),
20648
- taxPaidTotal: new forms.FormControl({
20649
- value: partnershipsAndTrusts.taxPaidTotal,
20634
+ trustsIncomeTotalTax: new forms.FormControl({
20635
+ value: partnershipsAndTrusts.trustsIncomeTotalTax,
20650
20636
  disabled: true
20651
20637
  }),
20652
20638
  frankingCreditsTotal: new forms.FormControl({