taxtank-core 0.21.9 → 0.21.10

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.
@@ -7145,6 +7145,13 @@
7145
7145
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["HOME_OFFICE_RUNNING"] = 17] = "HOME_OFFICE_RUNNING";
7146
7146
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["TOOLS_EQUIPMENT"] = 18] = "TOOLS_EQUIPMENT";
7147
7147
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["HOME_OFFICE_OCCUPANCY"] = 19] = "HOME_OFFICE_OCCUPANCY";
7148
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE"] = 20] = "AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE";
7149
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["NEWSPAPER"] = 21] = "NEWSPAPER";
7150
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["PRINTING_POSTAGE_STATIONERY"] = 22] = "PRINTING_POSTAGE_STATIONERY";
7151
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["SEMINARS_ETC"] = 23] = "SEMINARS_ETC";
7152
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["TELEPHONE"] = 24] = "TELEPHONE";
7153
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["UNION_FEES"] = 25] = "UNION_FEES";
7154
+ ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["OTHER"] = 26] = "OTHER";
7148
7155
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["DONATIONS"] = 27] = "DONATIONS";
7149
7156
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["PSI"] = 30] = "PSI";
7150
7157
  ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["BONUSES"] = 34] = "BONUSES";
@@ -9344,7 +9351,14 @@
9344
9351
  exports.ChartAccountsHeadingListEnum.OTHER_WORK_RELATED_EXPENSES,
9345
9352
  exports.ChartAccountsHeadingListEnum.SUBSCRIPTIONS,
9346
9353
  exports.ChartAccountsHeadingListEnum.HOME_OFFICE_RUNNING,
9347
- exports.ChartAccountsHeadingListEnum.HOME_OFFICE_OCCUPANCY
9354
+ exports.ChartAccountsHeadingListEnum.HOME_OFFICE_OCCUPANCY,
9355
+ exports.ChartAccountsHeadingListEnum.AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE,
9356
+ exports.ChartAccountsHeadingListEnum.NEWSPAPER,
9357
+ exports.ChartAccountsHeadingListEnum.PRINTING_POSTAGE_STATIONERY,
9358
+ exports.ChartAccountsHeadingListEnum.SEMINARS_ETC,
9359
+ exports.ChartAccountsHeadingListEnum.TELEPHONE,
9360
+ exports.ChartAccountsHeadingListEnum.UNION_FEES,
9361
+ exports.ChartAccountsHeadingListEnum.OTHER
9348
9362
  ],
9349
9363
  workRelatedSelfEducationExpenses: [
9350
9364
  exports.ChartAccountsHeadingListEnum.SELF_EDUCATIONAL_EXPENSES
@@ -9420,45 +9434,45 @@
9420
9434
  this.workRelatedClothingExpenses = this.transactions
9421
9435
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.workRelatedClothingExpenses);
9422
9436
  this.personalSuperContributions = this.transactions
9423
- .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.personalSuperContributions);
9437
+ .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.personalSuperContributions);
9424
9438
  this.workRelatedSelfEducationExpenses = this.transactions
9425
9439
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.workRelatedSelfEducationExpenses);
9426
9440
  this.vehicleExpensesTotalAmount = this.getVehicleExpensesTotalAmount();
9427
9441
  this.workRelatedTravelExpensesTotalAmount = this.transactions
9428
9442
  .filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.WORK_RELATED_TRAVEL_EXPENSES)
9429
- .sumBy('amount');
9443
+ .sumBy('claimAmount');
9430
9444
  this.workRelatedClothingType = this.workRelatedClothingExpenses.length ? exports.DeductionClothingTypeEnum.COMPULSORY_C : null;
9431
- this.workRelatedClothingTotalAmount = this.workRelatedClothingExpenses.sumBy('amount');
9445
+ this.workRelatedClothingTotalAmount = this.workRelatedClothingExpenses.sumBy('claimAmount');
9432
9446
  this.workRelatedSelfEducationType = this.workRelatedSelfEducationExpenses.length ?
9433
9447
  exports.DeductionSelfEducationTypeEnum.IMPROVE_SKILLS_FOR_CURRENT_EARNINGS_K : null;
9434
- this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('amount');
9448
+ this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('claimAmount');
9435
9449
  this.lowValuePoolDeductionTotalAmount = this.depreciations.getByTankType(exports.TankTypeEnum.WORK)
9436
9450
  .getLowValuePoolDepreciations().sumBy('claimAmount');
9437
9451
  this.interestExpensesTotalAmount = this.transactions
9438
9452
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.interestExpenses)
9439
- .sumBy('amount');
9453
+ .sumBy('claimAmount');
9440
9454
  this.dividendExpensesTotalAmount = this.transactions
9441
9455
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.dividendExpenses)
9442
- .sumBy('amount');
9456
+ .sumBy('claimAmount');
9443
9457
  this.donationsTotalAmount = this.transactions
9444
9458
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.donations)
9445
- .sumBy('amount');
9459
+ .sumBy('claimAmount');
9446
9460
  this.interestsChargedByATOTotalAmount = this.transactions
9447
9461
  .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.interestsChargedByATO)
9448
- .sumBy('amount');
9462
+ .sumBy('claimAmount');
9449
9463
  this.litigationCostsTotalAmount = this.transactions
9450
9464
  .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.litigationCosts)
9451
- .sumBy('amount');
9465
+ .sumBy('claimAmount');
9452
9466
  this.otherManagingCostsTotalAmount = this.transactions
9453
9467
  .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.otherManagingCosts)
9454
- .sumBy('amount');
9455
- this.personalSuperContributionsTotalAmount = this.personalSuperContributions.sumBy('amount');
9468
+ .sumBy('claimAmount');
9469
+ this.personalSuperContributionsTotalAmount = this.personalSuperContributions.sumBy('claimAmount');
9456
9470
  this.forestryManagedInvestmentSchemesDeductionsTotalAmount = this.transactions
9457
9471
  .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.forestryManagedInvestmentSchemesDeductions)
9458
- .sumBy('amount');
9472
+ .sumBy('claimAmount');
9459
9473
  this.otherDeductionsTotalAmount = this.transactions
9460
9474
  .filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.otherDeductions)
9461
- .sumBy('amount');
9475
+ .sumBy('claimAmount');
9462
9476
  }
9463
9477
  MyTaxDeductions.prototype.getVehicleExpensesTotalAmount = function () {
9464
9478
  var _a;
@@ -9469,7 +9483,7 @@
9469
9483
  };
9470
9484
  MyTaxDeductions.prototype.setVehicleClaimData = function () {
9471
9485
  this.klmsMethodClaimAmount = this.vehicleClaim.getKLMsClaimAmount(this.vehicleClaimRate);
9472
- this.totalExpensesAmount = new VehicleExpenseCollection(this.transactions.getByTankType(this.vehicleClaim.tankType), this.depreciations.getByTankType(this.vehicleClaim.tankType), this.vehicleClaim).sumBy('amount');
9486
+ this.totalExpensesAmount = new VehicleExpenseCollection(this.transactions.getByTankType(this.vehicleClaim.tankType), this.depreciations.getByTankType(this.vehicleClaim.tankType), this.vehicleClaim).sumBy('claimAmount');
9473
9487
  };
9474
9488
  /**
9475
9489
  * Total amount from Other work related expenses and Tools & equipment depreciations
@@ -9477,7 +9491,7 @@
9477
9491
  MyTaxDeductions.prototype.setOtherWorkRelatedExpensesTotalAmount = function () {
9478
9492
  var otherIncomeRelatedExpenses = this.transactions
9479
9493
  .filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherIncomeRelatedExpenses);
9480
- this.otherWorkRelatedExpensesTotalAmount = Math.abs(otherIncomeRelatedExpenses.sumBy('amount')) +
9494
+ this.otherWorkRelatedExpensesTotalAmount = Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) +
9481
9495
  this.depreciations.filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount');
9482
9496
  };
9483
9497
  return MyTaxDeductions;
@@ -9536,8 +9550,8 @@
9536
9550
  var taxOffsetsReportItem = summarySection.items.findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.TAX_OFFSETS);
9537
9551
  var lowMiddleIncomeTaxOffsets = this.getLowMiddleIncomeTaxOffsets(taxOffsetsReportItem);
9538
9552
  var taxPayable = grossTaxPayableReportItem.items.findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.TAX_ON_TAXABLE_INCOME).amount;
9539
- var medicareLevy = medicareReportItem.details.findBy('name', 'Medicare Levy Surcharge').amount;
9540
- var medicareLevySurcharge = medicareReportItem.details.findBy('name', 'Medicare Levy (based on single)').amount;
9553
+ var medicareLevy = medicareReportItem.details.findBy('name', 'Medicare Levy (based on single)').amount;
9554
+ var medicareLevySurcharge = medicareReportItem.details.findBy('name', 'Medicare Levy Surcharge').amount;
9541
9555
  var taxCredits = summarySection.items.findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.TAX_CREDITS).amount;
9542
9556
  var taxOffsets = this.getTaxOffsets(taxOffsetsReportItem.amount, lowMiddleIncomeTaxOffsets);
9543
9557
  return classTransformer.plainToClass(MyTaxEstimate, {
@@ -9645,7 +9659,7 @@
9645
9659
  this.interestPaidTransactions = transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.ATO_INTEREST_PAID);
9646
9660
  this.interestEarnedTotalAmount = this.interestEarnedTransactions.sumBy('amount');
9647
9661
  this.interestEarnedTotalTax = this.interestEarnedTransactions.sumBy('tax');
9648
- this.interestPaidTotalAmount = this.interestEarnedTransactions.sumBy('amount');
9662
+ this.interestPaidTotalAmount = this.interestPaidTransactions.sumBy('amount');
9649
9663
  }
9650
9664
  return MyTaxInterest;
9651
9665
  }());
@@ -9744,26 +9758,51 @@
9744
9758
  }());
9745
9759
 
9746
9760
  var MyTaxRent = /** @class */ (function () {
9747
- function MyTaxRent(transactions, depreciations) {
9761
+ function MyTaxRent(transactions, depreciations, taxSummary) {
9748
9762
  this.propertyExpenses = transactions.getPropertyTransactions().getExpenseTransactions();
9763
+ this.taxSummaryPropertySection = taxSummary.property;
9749
9764
  this.grossRentAmount = transactions
9765
+ .getPropertyTransactions()
9750
9766
  .getIncomeTransactions()
9751
9767
  .filterBy('chartAccounts.id', exports.ChartAccountsListEnum.RENTAL_INCOME)
9752
- .sumBy('amount') +
9753
- transactions.
9754
- getIncomeTransactions()
9768
+ .sumBy('claimAmount') +
9769
+ transactions
9770
+ .getPropertyTransactions()
9771
+ .getIncomeTransactions()
9755
9772
  .filterBy('chartAccounts.id', exports.ChartAccountsListEnum.OTHER_RENTAL_INCOME)
9756
- .sumBy('amount');
9773
+ .sumBy('claimAmount');
9757
9774
  this.interestDeductionsAmount = Math.abs(transactions.getInterestTransactions().sumBy('amount'));
9758
9775
  this.capitalWorksDeductionsAmount = Math.abs(depreciations.getCapitalDepreciations().sumBy('claimAmount'));
9759
- this.otherRentalDeductionsAmount = Math.abs(depreciations.getAssets().sumBy('claimAmount') +
9760
- depreciations.getBorrowingExpenseDepreciations().sumBy('claimAmount') +
9761
- this.propertyExpenses.sumBy('amount'));
9776
+ this.otherRentalDeductionsAmount = this.calculateOtherRentalDeductionsAmount();
9777
+ /**
9778
+ * @Todo Vik uncomment when task TT-2009 will be implemented
9779
+ */
9780
+ // this.otherRentalDeductionsAmount = depreciations.getByTankType(TankTypeEnum.PROPERTY).getAssets().claimAmount +
9781
+ // depreciations.getByTankType(TankTypeEnum.PROPERTY).getBorrowingExpenseDepreciations().claimAmount +
9782
+ // Math.abs(this.propertyExpenses.sumBy('claimAmount'));
9762
9783
  this.netRent = this.grossRentAmount -
9763
9784
  this.interestDeductionsAmount -
9764
9785
  this.capitalWorksDeductionsAmount -
9765
9786
  this.otherRentalDeductionsAmount;
9766
9787
  }
9788
+ /**
9789
+ * @Todo Vik remove when TT-2009 will be implemented.
9790
+ * We use tax summary data here because claim amount from depreciation is different
9791
+ * from the claim amount that we get from tax summary (depreciation claim amount is not affected by property share,
9792
+ * property contract date, e.t.c.). Details in the TT-2009 task
9793
+ */
9794
+ MyTaxRent.prototype.calculateOtherRentalDeductionsAmount = function () {
9795
+ var plantAndEquipmentAmount = Math.abs(this.taxSummaryPropertySection.items
9796
+ .findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.DEPRECIATION)
9797
+ .amount);
9798
+ var borrowingExpensesAmount = Math.abs(this.taxSummaryPropertySection.items
9799
+ .findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.BORROWING_EXPENSES)
9800
+ .amount);
9801
+ var otherRentalDeductionsAmount = Math.abs(this.taxSummaryPropertySection.items
9802
+ .findBy('taxReturnCategory.id', exports.TaxReturnCategoryListEnum.OTHER_RENTAL_DEDUCTIONS)
9803
+ .amount);
9804
+ return +Math.floor(plantAndEquipmentAmount + borrowingExpensesAmount + otherRentalDeductionsAmount).toFixed(2);
9805
+ };
9767
9806
  return MyTaxRent;
9768
9807
  }());
9769
9808
 
@@ -15617,12 +15656,12 @@
15617
15656
  value: deductions.workRelatedTravelExpensesTotalAmount,
15618
15657
  disabled: true
15619
15658
  }),
15620
- workRelatedClothingType: new forms.FormControl(deductions.workRelatedClothingType, forms.Validators.required),
15659
+ workRelatedClothingType: new forms.FormControl(deductions.workRelatedClothingType, conditionalValidator(function () { return !!deductions.workRelatedClothingTotalAmount; }, forms.Validators.required)),
15621
15660
  workRelatedClothingTotalAmount: new forms.FormControl({
15622
15661
  value: deductions.workRelatedClothingTotalAmount,
15623
15662
  disabled: true
15624
15663
  }),
15625
- workRelatedSelfEducationType: new forms.FormControl(deductions.workRelatedSelfEducationType, forms.Validators.required),
15664
+ workRelatedSelfEducationType: new forms.FormControl(deductions.workRelatedSelfEducationType, conditionalValidator(function () { return !!deductions.workRelatedSelfEducationTotalAmount; }, forms.Validators.required)),
15626
15665
  workRelatedSelfEducationTotalAmount: new forms.FormControl({
15627
15666
  value: deductions.workRelatedSelfEducationTotalAmount,
15628
15667
  disabled: true
@@ -15659,6 +15698,11 @@
15659
15698
  value: deductions.otherManagingCostsTotalAmount,
15660
15699
  disabled: true
15661
15700
  }),
15701
+ fundName: new forms.FormControl(''),
15702
+ hasFund: new forms.FormControl(false),
15703
+ fundABN: new forms.FormControl(''),
15704
+ fundTFN: new forms.FormControl(''),
15705
+ fundAccountNumber: new forms.FormControl(''),
15662
15706
  personalSuperContributionsTotalAmount: new forms.FormControl({
15663
15707
  value: deductions.personalSuperContributionsTotalAmount,
15664
15708
  disabled: true