taxtank-core 0.28.100 → 0.28.102
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 +35 -41
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/forms/report/my-tax/index.js +1 -2
- package/esm2015/lib/forms/report/my-tax/my-tax-other-income.form.js +6 -1
- package/esm2015/lib/models/report/my-tax/index.js +1 -2
- package/esm2015/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.js +11 -3
- package/esm2015/lib/models/report/my-tax/my-tax-other-income/my-tax-other-income.js +22 -1
- package/fesm2015/taxtank-core.js +36 -37
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/forms/report/my-tax/index.d.ts +0 -1
- package/lib/models/report/my-tax/index.d.ts +0 -1
- package/lib/models/report/my-tax/my-tax-deductions/my-tax-deductions.d.ts +5 -0
- package/lib/models/report/my-tax/my-tax-other-income/my-tax-other-income.d.ts +6 -0
- package/package.json +1 -1
- package/esm2015/lib/forms/report/my-tax/my-tax-employee-share-schemes.form.js +0 -14
- package/esm2015/lib/models/report/my-tax/my-tax-employee-share-schemes/my-tax-employee-share-schemes.js +0 -24
- package/lib/forms/report/my-tax/my-tax-employee-share-schemes.form.d.ts +0 -5
- package/lib/models/report/my-tax/my-tax-employee-share-schemes/my-tax-employee-share-schemes.d.ts +0 -10
|
@@ -11739,7 +11739,7 @@
|
|
|
11739
11739
|
this.workRelatedClothingTotalAmount = this.workRelatedClothingExpenses.sumBy('claimAmount');
|
|
11740
11740
|
this.workRelatedSelfEducationType = this.workRelatedSelfEducationExpenses.length ?
|
|
11741
11741
|
exports.DeductionSelfEducationTypeEnum.IMPROVE_SKILLS_FOR_CURRENT_EARNINGS_K : null;
|
|
11742
|
-
this.workRelatedSelfEducationTotalAmount = this.
|
|
11742
|
+
this.workRelatedSelfEducationTotalAmount = this.calculateWorkRelatedSelfEducationTotalAmount();
|
|
11743
11743
|
this.lowValuePoolDeductionTotalAmount = this.depreciations.getByTankType(exports.TankTypeEnum.WORK)
|
|
11744
11744
|
.getLVPDepreciations().sumBy('claimAmount');
|
|
11745
11745
|
this.interestExpensesTotalAmount = this.transactions
|
|
@@ -11765,7 +11765,7 @@
|
|
|
11765
11765
|
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.forestryManagedInvestmentSchemesDeductions)
|
|
11766
11766
|
.sumBy('claimAmount');
|
|
11767
11767
|
this.otherDeductionsTotalAmount = this.transactions
|
|
11768
|
-
.filterBy('chartAccounts.id', DEDUCTION_CATEGORIES.otherDeductions)
|
|
11768
|
+
.filterBy('chartAccounts.heading.id', DEDUCTION_CATEGORIES.otherDeductions)
|
|
11769
11769
|
.sumBy('claimAmount');
|
|
11770
11770
|
}
|
|
11771
11771
|
MyTaxDeductions.prototype.getVehicleExpensesTotalAmount = function () {
|
|
@@ -11787,8 +11787,16 @@
|
|
|
11787
11787
|
this.otherWorkRelatedExpensesTotalAmount = -Math.abs(otherIncomeRelatedExpenses.sumBy('claimAmount')) +
|
|
11788
11788
|
this.depreciations.filterBy('chartAccounts.heading.id', exports.ChartAccountsHeadingListEnum.TOOLS_EQUIPMENT).sumBy('claimAmount');
|
|
11789
11789
|
};
|
|
11790
|
+
MyTaxDeductions.prototype.calculateWorkRelatedSelfEducationTotalAmount = function () {
|
|
11791
|
+
return !this.workRelatedSelfEducationExpenses ? 0 :
|
|
11792
|
+
this.workRelatedSelfEducationExpenses.sumBy('claimAmount') - MyTaxDeductions.selfEducationNotDeductibleAmount;
|
|
11793
|
+
};
|
|
11790
11794
|
return MyTaxDeductions;
|
|
11791
11795
|
}());
|
|
11796
|
+
/**
|
|
11797
|
+
* can't claim the first $250 of self-education expenses (Item code D4)
|
|
11798
|
+
*/
|
|
11799
|
+
MyTaxDeductions.selfEducationNotDeductibleAmount = -250;
|
|
11792
11800
|
|
|
11793
11801
|
var MyTaxDividends = /** @class */ (function () {
|
|
11794
11802
|
function MyTaxDividends(transactions) {
|
|
@@ -11807,29 +11815,6 @@
|
|
|
11807
11815
|
return MyTaxDividends;
|
|
11808
11816
|
}());
|
|
11809
11817
|
|
|
11810
|
-
var MyTaxEmployeeShareSchemes = /** @class */ (function () {
|
|
11811
|
-
function MyTaxEmployeeShareSchemes(transactions) {
|
|
11812
|
-
this.transactions = transactions.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.EMPLOYEE_SHARE_SCHEME_INCOME);
|
|
11813
|
-
this.eligibleForReductionAmount = this.transactions.getTransactionsMetadata()
|
|
11814
|
-
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.ELIGIBLE_FOR_REDUCTION)
|
|
11815
|
-
.sumBy('value');
|
|
11816
|
-
this.notEligibleForReductionAmount = this.transactions.getTransactionsMetadata()
|
|
11817
|
-
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.NOT_ELIGIBLE_FOR_DEDUCTION)
|
|
11818
|
-
.sumBy('value');
|
|
11819
|
-
this.discountFromDeferredSchemeAmount = this.transactions.getTransactionsMetadata()
|
|
11820
|
-
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.DISCOUNT_FROM_DEFERRED_SCHEMES)
|
|
11821
|
-
.sumBy('value');
|
|
11822
|
-
this.totalAssessableDiscountAmount = this.transactions.getTransactionsMetadata()
|
|
11823
|
-
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.NOT_ELIGIBLE_FOR_DEDUCTION)
|
|
11824
|
-
.sumBy('value') +
|
|
11825
|
-
this.transactions.getTransactionsMetadata()
|
|
11826
|
-
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.DISCOUNT_FROM_DEFERRED_SCHEMES)
|
|
11827
|
-
.sumBy('value');
|
|
11828
|
-
this.shareSchemesTotalTax = this.transactions.sumBy('tax');
|
|
11829
|
-
}
|
|
11830
|
-
return MyTaxEmployeeShareSchemes;
|
|
11831
|
-
}());
|
|
11832
|
-
|
|
11833
11818
|
/**
|
|
11834
11819
|
* @Todo add link to documentation about related fields, add comments to methods
|
|
11835
11820
|
*/
|
|
@@ -11983,6 +11968,26 @@
|
|
|
11983
11968
|
var MyTaxOtherIncome = /** @class */ (function () {
|
|
11984
11969
|
function MyTaxOtherIncome(transactions) {
|
|
11985
11970
|
this.transactions = transactions;
|
|
11971
|
+
this.employeeShareSchemesTransactions = transactions
|
|
11972
|
+
.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.EMPLOYEE_SHARE_SCHEME_INCOME);
|
|
11973
|
+
// Employee Share Schemes data
|
|
11974
|
+
this.eligibleForReductionAmount = this.employeeShareSchemesTransactions.getTransactionsMetadata()
|
|
11975
|
+
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.ELIGIBLE_FOR_REDUCTION)
|
|
11976
|
+
.sumBy('value');
|
|
11977
|
+
this.notEligibleForReductionAmount = this.employeeShareSchemesTransactions.getTransactionsMetadata()
|
|
11978
|
+
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.NOT_ELIGIBLE_FOR_DEDUCTION)
|
|
11979
|
+
.sumBy('value');
|
|
11980
|
+
this.discountFromDeferredSchemeAmount = this.employeeShareSchemesTransactions.getTransactionsMetadata()
|
|
11981
|
+
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.DISCOUNT_FROM_DEFERRED_SCHEMES)
|
|
11982
|
+
.sumBy('value');
|
|
11983
|
+
this.totalAssessableDiscountAmount = this.employeeShareSchemesTransactions.getTransactionsMetadata()
|
|
11984
|
+
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.NOT_ELIGIBLE_FOR_DEDUCTION)
|
|
11985
|
+
.sumBy('value') +
|
|
11986
|
+
this.employeeShareSchemesTransactions.getTransactionsMetadata()
|
|
11987
|
+
.filterBy('chartAccountsMetadata.id', exports.ChartAccountsMetadataListEnum.DISCOUNT_FROM_DEFERRED_SCHEMES)
|
|
11988
|
+
.sumBy('value');
|
|
11989
|
+
this.shareSchemesTotalTax = this.employeeShareSchemesTransactions.sumBy('tax');
|
|
11990
|
+
// Other income data
|
|
11986
11991
|
this.lumpSumPaymentsInArrearsTransactions = this.transactions
|
|
11987
11992
|
.filterBy('chartAccounts.id', exports.ChartAccountsListEnum.LUMP_SUM_PAYMENTS_IN_ARREARS);
|
|
11988
11993
|
this.bonusesTotalAmount = this.transactions
|
|
@@ -20402,20 +20407,6 @@
|
|
|
20402
20407
|
return MyTaxDividendsForm;
|
|
20403
20408
|
}(AbstractForm));
|
|
20404
20409
|
|
|
20405
|
-
var MyTaxEmployeeShareSchemesForm = /** @class */ (function (_super) {
|
|
20406
|
-
__extends(MyTaxEmployeeShareSchemesForm, _super);
|
|
20407
|
-
function MyTaxEmployeeShareSchemesForm(shareSchemes) {
|
|
20408
|
-
return _super.call(this, {
|
|
20409
|
-
eligibleForReductionAmount: new forms.FormControl(shareSchemes.eligibleForReductionAmount),
|
|
20410
|
-
notEligibleForReductionAmount: new forms.FormControl(shareSchemes.notEligibleForReductionAmount),
|
|
20411
|
-
discountFromDeferredSchemeAmount: new forms.FormControl(shareSchemes.discountFromDeferredSchemeAmount),
|
|
20412
|
-
totalAssessableDiscountAmount: new forms.FormControl(shareSchemes.totalAssessableDiscountAmount),
|
|
20413
|
-
shareSchemesTotalTax: new forms.FormControl(shareSchemes.shareSchemesTotalTax)
|
|
20414
|
-
}) || this;
|
|
20415
|
-
}
|
|
20416
|
-
return MyTaxEmployeeShareSchemesForm;
|
|
20417
|
-
}(AbstractForm));
|
|
20418
|
-
|
|
20419
20410
|
var MyTaxIncomeStatementsForm = /** @class */ (function (_super) {
|
|
20420
20411
|
__extends(MyTaxIncomeStatementsForm, _super);
|
|
20421
20412
|
function MyTaxIncomeStatementsForm(incomeStatements, user) {
|
|
@@ -20593,6 +20584,11 @@
|
|
|
20593
20584
|
__extends(MyTaxOtherIncomeForm, _super);
|
|
20594
20585
|
function MyTaxOtherIncomeForm(otherIncome) {
|
|
20595
20586
|
return _super.call(this, {
|
|
20587
|
+
eligibleForReductionAmount: new forms.FormControl(otherIncome.eligibleForReductionAmount),
|
|
20588
|
+
notEligibleForReductionAmount: new forms.FormControl(otherIncome.notEligibleForReductionAmount),
|
|
20589
|
+
discountFromDeferredSchemeAmount: new forms.FormControl(otherIncome.discountFromDeferredSchemeAmount),
|
|
20590
|
+
totalAssessableDiscountAmount: new forms.FormControl(otherIncome.totalAssessableDiscountAmount),
|
|
20591
|
+
shareSchemesTotalTax: new forms.FormControl(otherIncome.shareSchemesTotalTax),
|
|
20596
20592
|
bonusesTotalAmount: new forms.FormControl({
|
|
20597
20593
|
value: otherIncome.bonusesTotalAmount,
|
|
20598
20594
|
disabled: true
|
|
@@ -20976,8 +20972,6 @@
|
|
|
20976
20972
|
exports.MyTaxDeductionsForm = MyTaxDeductionsForm;
|
|
20977
20973
|
exports.MyTaxDividends = MyTaxDividends;
|
|
20978
20974
|
exports.MyTaxDividendsForm = MyTaxDividendsForm;
|
|
20979
|
-
exports.MyTaxEmployeeShareSchemes = MyTaxEmployeeShareSchemes;
|
|
20980
|
-
exports.MyTaxEmployeeShareSchemesForm = MyTaxEmployeeShareSchemesForm;
|
|
20981
20975
|
exports.MyTaxEstimate = MyTaxEstimate;
|
|
20982
20976
|
exports.MyTaxIncomeStatements = MyTaxIncomeStatements;
|
|
20983
20977
|
exports.MyTaxIncomeStatementsForm = MyTaxIncomeStatementsForm;
|