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.
- package/bundles/taxtank-core.umd.js +73 -29
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Enums/chart-accounts-heading-list.enum.js +8 -1
- package/esm2015/lib/forms/report/my-tax/my-tax-deductions.form.js +9 -3
- package/esm2015/lib/models/report/my-tax/my-tax-deductions/deduction-fields.const.js +9 -2
- package/esm2015/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.js +16 -16
- package/esm2015/lib/models/report/my-tax/my-tax-estimate/my-tax-estimate.js +3 -3
- package/esm2015/lib/models/report/my-tax/my-tax-interest/my-tax-interest.js +2 -2
- package/esm2015/lib/models/report/my-tax/my-tax-rent/my-tax-rent.js +35 -9
- package/fesm2015/taxtank-core.js +73 -29
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Enums/chart-accounts-heading-list.enum.d.ts +7 -0
- package/lib/forms/report/my-tax/my-tax-deductions.form.d.ts +1 -1
- package/lib/models/report/my-tax/my-tax-rent/my-tax-rent.d.ts +11 -1
- package/package.json +1 -1
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -5568,6 +5568,13 @@ var ChartAccountsHeadingListEnum;
|
|
|
5568
5568
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["HOME_OFFICE_RUNNING"] = 17] = "HOME_OFFICE_RUNNING";
|
|
5569
5569
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["TOOLS_EQUIPMENT"] = 18] = "TOOLS_EQUIPMENT";
|
|
5570
5570
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["HOME_OFFICE_OCCUPANCY"] = 19] = "HOME_OFFICE_OCCUPANCY";
|
|
5571
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE"] = 20] = "AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE";
|
|
5572
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["NEWSPAPER"] = 21] = "NEWSPAPER";
|
|
5573
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["PRINTING_POSTAGE_STATIONERY"] = 22] = "PRINTING_POSTAGE_STATIONERY";
|
|
5574
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["SEMINARS_ETC"] = 23] = "SEMINARS_ETC";
|
|
5575
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["TELEPHONE"] = 24] = "TELEPHONE";
|
|
5576
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["UNION_FEES"] = 25] = "UNION_FEES";
|
|
5577
|
+
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["OTHER"] = 26] = "OTHER";
|
|
5571
5578
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["DONATIONS"] = 27] = "DONATIONS";
|
|
5572
5579
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["PSI"] = 30] = "PSI";
|
|
5573
5580
|
ChartAccountsHeadingListEnum[ChartAccountsHeadingListEnum["BONUSES"] = 34] = "BONUSES";
|
|
@@ -7437,7 +7444,14 @@ const DEDUCTION_CATEGORIES = {
|
|
|
7437
7444
|
ChartAccountsHeadingListEnum.OTHER_WORK_RELATED_EXPENSES,
|
|
7438
7445
|
ChartAccountsHeadingListEnum.SUBSCRIPTIONS,
|
|
7439
7446
|
ChartAccountsHeadingListEnum.HOME_OFFICE_RUNNING,
|
|
7440
|
-
ChartAccountsHeadingListEnum.HOME_OFFICE_OCCUPANCY
|
|
7447
|
+
ChartAccountsHeadingListEnum.HOME_OFFICE_OCCUPANCY,
|
|
7448
|
+
ChartAccountsHeadingListEnum.AWARD_OVERTIME_MEAL_ALLOWANCE_EXPENSE,
|
|
7449
|
+
ChartAccountsHeadingListEnum.NEWSPAPER,
|
|
7450
|
+
ChartAccountsHeadingListEnum.PRINTING_POSTAGE_STATIONERY,
|
|
7451
|
+
ChartAccountsHeadingListEnum.SEMINARS_ETC,
|
|
7452
|
+
ChartAccountsHeadingListEnum.TELEPHONE,
|
|
7453
|
+
ChartAccountsHeadingListEnum.UNION_FEES,
|
|
7454
|
+
ChartAccountsHeadingListEnum.OTHER
|
|
7441
7455
|
],
|
|
7442
7456
|
workRelatedSelfEducationExpenses: [
|
|
7443
7457
|
ChartAccountsHeadingListEnum.SELF_EDUCATIONAL_EXPENSES
|
|
@@ -7513,45 +7527,45 @@ class MyTaxDeductions {
|
|
|
7513
7527
|
this.workRelatedClothingExpenses = this.transactions
|
|
7514
7528
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.workRelatedClothingExpenses);
|
|
7515
7529
|
this.personalSuperContributions = this.transactions
|
|
7516
|
-
.filterBy('chartAccounts.
|
|
7530
|
+
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.personalSuperContributions);
|
|
7517
7531
|
this.workRelatedSelfEducationExpenses = this.transactions
|
|
7518
7532
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.workRelatedSelfEducationExpenses);
|
|
7519
7533
|
this.vehicleExpensesTotalAmount = this.getVehicleExpensesTotalAmount();
|
|
7520
7534
|
this.workRelatedTravelExpensesTotalAmount = this.transactions
|
|
7521
7535
|
.filterBy('chartAccounts.heading.id', ChartAccountsHeadingListEnum.WORK_RELATED_TRAVEL_EXPENSES)
|
|
7522
|
-
.sumBy('
|
|
7536
|
+
.sumBy('claimAmount');
|
|
7523
7537
|
this.workRelatedClothingType = this.workRelatedClothingExpenses.length ? DeductionClothingTypeEnum.COMPULSORY_C : null;
|
|
7524
|
-
this.workRelatedClothingTotalAmount = this.workRelatedClothingExpenses.sumBy('
|
|
7538
|
+
this.workRelatedClothingTotalAmount = this.workRelatedClothingExpenses.sumBy('claimAmount');
|
|
7525
7539
|
this.workRelatedSelfEducationType = this.workRelatedSelfEducationExpenses.length ?
|
|
7526
7540
|
DeductionSelfEducationTypeEnum.IMPROVE_SKILLS_FOR_CURRENT_EARNINGS_K : null;
|
|
7527
|
-
this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('
|
|
7541
|
+
this.workRelatedSelfEducationTotalAmount = this.workRelatedSelfEducationExpenses.sumBy('claimAmount');
|
|
7528
7542
|
this.lowValuePoolDeductionTotalAmount = this.depreciations.getByTankType(TankTypeEnum.WORK)
|
|
7529
7543
|
.getLowValuePoolDepreciations().sumBy('claimAmount');
|
|
7530
7544
|
this.interestExpensesTotalAmount = this.transactions
|
|
7531
7545
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.interestExpenses)
|
|
7532
|
-
.sumBy('
|
|
7546
|
+
.sumBy('claimAmount');
|
|
7533
7547
|
this.dividendExpensesTotalAmount = this.transactions
|
|
7534
7548
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.dividendExpenses)
|
|
7535
|
-
.sumBy('
|
|
7549
|
+
.sumBy('claimAmount');
|
|
7536
7550
|
this.donationsTotalAmount = this.transactions
|
|
7537
7551
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.donations)
|
|
7538
|
-
.sumBy('
|
|
7552
|
+
.sumBy('claimAmount');
|
|
7539
7553
|
this.interestsChargedByATOTotalAmount = this.transactions
|
|
7540
7554
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.interestsChargedByATO)
|
|
7541
|
-
.sumBy('
|
|
7555
|
+
.sumBy('claimAmount');
|
|
7542
7556
|
this.litigationCostsTotalAmount = this.transactions
|
|
7543
7557
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.litigationCosts)
|
|
7544
|
-
.sumBy('
|
|
7558
|
+
.sumBy('claimAmount');
|
|
7545
7559
|
this.otherManagingCostsTotalAmount = this.transactions
|
|
7546
7560
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.otherManagingCosts)
|
|
7547
|
-
.sumBy('
|
|
7548
|
-
this.personalSuperContributionsTotalAmount = this.personalSuperContributions.sumBy('
|
|
7561
|
+
.sumBy('claimAmount');
|
|
7562
|
+
this.personalSuperContributionsTotalAmount = this.personalSuperContributions.sumBy('claimAmount');
|
|
7549
7563
|
this.forestryManagedInvestmentSchemesDeductionsTotalAmount = this.transactions
|
|
7550
7564
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.forestryManagedInvestmentSchemesDeductions)
|
|
7551
|
-
.sumBy('
|
|
7565
|
+
.sumBy('claimAmount');
|
|
7552
7566
|
this.otherDeductionsTotalAmount = this.transactions
|
|
7553
7567
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.otherDeductions)
|
|
7554
|
-
.sumBy('
|
|
7568
|
+
.sumBy('claimAmount');
|
|
7555
7569
|
}
|
|
7556
7570
|
getVehicleExpensesTotalAmount() {
|
|
7557
7571
|
var _a;
|
|
@@ -7562,7 +7576,7 @@ class MyTaxDeductions {
|
|
|
7562
7576
|
}
|
|
7563
7577
|
setVehicleClaimData() {
|
|
7564
7578
|
this.klmsMethodClaimAmount = this.vehicleClaim.getKLMsClaimAmount(this.vehicleClaimRate);
|
|
7565
|
-
this.totalExpensesAmount = new VehicleExpenseCollection(this.transactions.getByTankType(this.vehicleClaim.tankType), this.depreciations.getByTankType(this.vehicleClaim.tankType), this.vehicleClaim).sumBy('
|
|
7579
|
+
this.totalExpensesAmount = new VehicleExpenseCollection(this.transactions.getByTankType(this.vehicleClaim.tankType), this.depreciations.getByTankType(this.vehicleClaim.tankType), this.vehicleClaim).sumBy('claimAmount');
|
|
7566
7580
|
}
|
|
7567
7581
|
/**
|
|
7568
7582
|
* Total amount from Other work related expenses and Tools & equipment depreciations
|
|
@@ -7570,7 +7584,7 @@ class MyTaxDeductions {
|
|
|
7570
7584
|
setOtherWorkRelatedExpensesTotalAmount() {
|
|
7571
7585
|
const otherIncomeRelatedExpenses = this.transactions
|
|
7572
7586
|
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherIncomeRelatedExpenses);
|
|
7573
|
-
this.otherWorkRelatedExpensesTotalAmount = Math.abs(otherIncomeRelatedExpenses.sumBy('
|
|
7587
|
+
this.otherWorkRelatedExpensesTotalAmount = Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) +
|
|
7574
7588
|
this.depreciations.filterBy('chartAccounts.heading.id', ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount');
|
|
7575
7589
|
}
|
|
7576
7590
|
}
|
|
@@ -7624,8 +7638,8 @@ class MyTaxEstimate {
|
|
|
7624
7638
|
const taxOffsetsReportItem = summarySection.items.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.TAX_OFFSETS);
|
|
7625
7639
|
const lowMiddleIncomeTaxOffsets = this.getLowMiddleIncomeTaxOffsets(taxOffsetsReportItem);
|
|
7626
7640
|
const taxPayable = grossTaxPayableReportItem.items.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.TAX_ON_TAXABLE_INCOME).amount;
|
|
7627
|
-
const medicareLevy = medicareReportItem.details.findBy('name', 'Medicare Levy
|
|
7628
|
-
const medicareLevySurcharge = medicareReportItem.details.findBy('name', 'Medicare Levy
|
|
7641
|
+
const medicareLevy = medicareReportItem.details.findBy('name', 'Medicare Levy (based on single)').amount;
|
|
7642
|
+
const medicareLevySurcharge = medicareReportItem.details.findBy('name', 'Medicare Levy Surcharge').amount;
|
|
7629
7643
|
const taxCredits = summarySection.items.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.TAX_CREDITS).amount;
|
|
7630
7644
|
const taxOffsets = this.getTaxOffsets(taxOffsetsReportItem.amount, lowMiddleIncomeTaxOffsets);
|
|
7631
7645
|
return plainToClass(MyTaxEstimate, {
|
|
@@ -7730,7 +7744,7 @@ class MyTaxInterest {
|
|
|
7730
7744
|
this.interestPaidTransactions = transactions.filterBy('chartAccounts.id', ChartAccountsListEnum.ATO_INTEREST_PAID);
|
|
7731
7745
|
this.interestEarnedTotalAmount = this.interestEarnedTransactions.sumBy('amount');
|
|
7732
7746
|
this.interestEarnedTotalTax = this.interestEarnedTransactions.sumBy('tax');
|
|
7733
|
-
this.interestPaidTotalAmount = this.
|
|
7747
|
+
this.interestPaidTotalAmount = this.interestPaidTransactions.sumBy('amount');
|
|
7734
7748
|
}
|
|
7735
7749
|
}
|
|
7736
7750
|
|
|
@@ -7824,26 +7838,51 @@ class MyTaxPartnershipsAndTrusts {
|
|
|
7824
7838
|
}
|
|
7825
7839
|
|
|
7826
7840
|
class MyTaxRent {
|
|
7827
|
-
constructor(transactions, depreciations) {
|
|
7841
|
+
constructor(transactions, depreciations, taxSummary) {
|
|
7828
7842
|
this.propertyExpenses = transactions.getPropertyTransactions().getExpenseTransactions();
|
|
7843
|
+
this.taxSummaryPropertySection = taxSummary.property;
|
|
7829
7844
|
this.grossRentAmount = transactions
|
|
7845
|
+
.getPropertyTransactions()
|
|
7830
7846
|
.getIncomeTransactions()
|
|
7831
7847
|
.filterBy('chartAccounts.id', ChartAccountsListEnum.RENTAL_INCOME)
|
|
7832
|
-
.sumBy('
|
|
7833
|
-
transactions
|
|
7834
|
-
|
|
7848
|
+
.sumBy('claimAmount') +
|
|
7849
|
+
transactions
|
|
7850
|
+
.getPropertyTransactions()
|
|
7851
|
+
.getIncomeTransactions()
|
|
7835
7852
|
.filterBy('chartAccounts.id', ChartAccountsListEnum.OTHER_RENTAL_INCOME)
|
|
7836
|
-
.sumBy('
|
|
7853
|
+
.sumBy('claimAmount');
|
|
7837
7854
|
this.interestDeductionsAmount = Math.abs(transactions.getInterestTransactions().sumBy('amount'));
|
|
7838
7855
|
this.capitalWorksDeductionsAmount = Math.abs(depreciations.getCapitalDepreciations().sumBy('claimAmount'));
|
|
7839
|
-
this.otherRentalDeductionsAmount =
|
|
7840
|
-
|
|
7841
|
-
|
|
7856
|
+
this.otherRentalDeductionsAmount = this.calculateOtherRentalDeductionsAmount();
|
|
7857
|
+
/**
|
|
7858
|
+
* @Todo Vik uncomment when task TT-2009 will be implemented
|
|
7859
|
+
*/
|
|
7860
|
+
// this.otherRentalDeductionsAmount = depreciations.getByTankType(TankTypeEnum.PROPERTY).getAssets().claimAmount +
|
|
7861
|
+
// depreciations.getByTankType(TankTypeEnum.PROPERTY).getBorrowingExpenseDepreciations().claimAmount +
|
|
7862
|
+
// Math.abs(this.propertyExpenses.sumBy('claimAmount'));
|
|
7842
7863
|
this.netRent = this.grossRentAmount -
|
|
7843
7864
|
this.interestDeductionsAmount -
|
|
7844
7865
|
this.capitalWorksDeductionsAmount -
|
|
7845
7866
|
this.otherRentalDeductionsAmount;
|
|
7846
7867
|
}
|
|
7868
|
+
/**
|
|
7869
|
+
* @Todo Vik remove when TT-2009 will be implemented.
|
|
7870
|
+
* We use tax summary data here because claim amount from depreciation is different
|
|
7871
|
+
* from the claim amount that we get from tax summary (depreciation claim amount is not affected by property share,
|
|
7872
|
+
* property contract date, e.t.c.). Details in the TT-2009 task
|
|
7873
|
+
*/
|
|
7874
|
+
calculateOtherRentalDeductionsAmount() {
|
|
7875
|
+
const plantAndEquipmentAmount = Math.abs(this.taxSummaryPropertySection.items
|
|
7876
|
+
.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.DEPRECIATION)
|
|
7877
|
+
.amount);
|
|
7878
|
+
const borrowingExpensesAmount = Math.abs(this.taxSummaryPropertySection.items
|
|
7879
|
+
.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.BORROWING_EXPENSES)
|
|
7880
|
+
.amount);
|
|
7881
|
+
const otherRentalDeductionsAmount = Math.abs(this.taxSummaryPropertySection.items
|
|
7882
|
+
.findBy('taxReturnCategory.id', TaxReturnCategoryListEnum.OTHER_RENTAL_DEDUCTIONS)
|
|
7883
|
+
.amount);
|
|
7884
|
+
return +Math.floor(plantAndEquipmentAmount + borrowingExpensesAmount + otherRentalDeductionsAmount).toFixed(2);
|
|
7885
|
+
}
|
|
7847
7886
|
}
|
|
7848
7887
|
|
|
7849
7888
|
/**
|
|
@@ -13149,12 +13188,12 @@ class MyTaxDeductionsForm extends AbstractForm {
|
|
|
13149
13188
|
value: deductions.workRelatedTravelExpensesTotalAmount,
|
|
13150
13189
|
disabled: true
|
|
13151
13190
|
}),
|
|
13152
|
-
workRelatedClothingType: new FormControl(deductions.workRelatedClothingType, Validators.required),
|
|
13191
|
+
workRelatedClothingType: new FormControl(deductions.workRelatedClothingType, conditionalValidator(() => !!deductions.workRelatedClothingTotalAmount, Validators.required)),
|
|
13153
13192
|
workRelatedClothingTotalAmount: new FormControl({
|
|
13154
13193
|
value: deductions.workRelatedClothingTotalAmount,
|
|
13155
13194
|
disabled: true
|
|
13156
13195
|
}),
|
|
13157
|
-
workRelatedSelfEducationType: new FormControl(deductions.workRelatedSelfEducationType, Validators.required),
|
|
13196
|
+
workRelatedSelfEducationType: new FormControl(deductions.workRelatedSelfEducationType, conditionalValidator(() => !!deductions.workRelatedSelfEducationTotalAmount, Validators.required)),
|
|
13158
13197
|
workRelatedSelfEducationTotalAmount: new FormControl({
|
|
13159
13198
|
value: deductions.workRelatedSelfEducationTotalAmount,
|
|
13160
13199
|
disabled: true
|
|
@@ -13191,6 +13230,11 @@ class MyTaxDeductionsForm extends AbstractForm {
|
|
|
13191
13230
|
value: deductions.otherManagingCostsTotalAmount,
|
|
13192
13231
|
disabled: true
|
|
13193
13232
|
}),
|
|
13233
|
+
fundName: new FormControl(''),
|
|
13234
|
+
hasFund: new FormControl(false),
|
|
13235
|
+
fundABN: new FormControl(''),
|
|
13236
|
+
fundTFN: new FormControl(''),
|
|
13237
|
+
fundAccountNumber: new FormControl(''),
|
|
13194
13238
|
personalSuperContributionsTotalAmount: new FormControl({
|
|
13195
13239
|
value: deductions.personalSuperContributionsTotalAmount,
|
|
13196
13240
|
disabled: true
|