taxtank-core 0.30.134 → 0.30.135
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/esm2020/lib/models/tax-summary/tax-summary.mjs +18 -3
- package/fesm2015/taxtank-core.mjs +17 -2
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +17 -2
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/models/tax-summary/tax-summary.d.ts +3 -0
- package/package.json +1 -1
|
@@ -12389,7 +12389,7 @@ class TaxSummary {
|
|
|
12389
12389
|
return [this.work, this.property, this.other, this.sole, this.summary];
|
|
12390
12390
|
}
|
|
12391
12391
|
getReportItems(sections) {
|
|
12392
|
-
return new ReportItemCollection([].concat(...
|
|
12392
|
+
return new ReportItemCollection([].concat(...sections.map((section) => section.items.toArray())));
|
|
12393
12393
|
}
|
|
12394
12394
|
get taxPercent() {
|
|
12395
12395
|
// Check if netAmount is not 0 to avoid division by zero
|
|
@@ -12407,12 +12407,27 @@ class TaxSummary {
|
|
|
12407
12407
|
return this.workNetTotal - Math.abs(taxWithheld);
|
|
12408
12408
|
}
|
|
12409
12409
|
get income() {
|
|
12410
|
-
return this.getReportItems([this.work, this.property, this.other]).sumByCategories([
|
|
12410
|
+
return this.getReportItems([this.work, this.property, this.sole, this.other]).sumByCategories([
|
|
12411
12411
|
...TAX_RETURN_CATEGORIES.work.income,
|
|
12412
12412
|
...TAX_RETURN_CATEGORIES.property.income,
|
|
12413
|
+
...TAX_RETURN_CATEGORIES.sole.income,
|
|
12413
12414
|
...TAX_RETURN_CATEGORIES.other.income,
|
|
12414
12415
|
]);
|
|
12415
12416
|
}
|
|
12417
|
+
get expense() {
|
|
12418
|
+
return this.getReportItems([this.work, this.property, this.sole, this.other]).sumByCategories([
|
|
12419
|
+
...TAX_RETURN_CATEGORIES.work.expenses,
|
|
12420
|
+
...TAX_RETURN_CATEGORIES.property.expenses,
|
|
12421
|
+
...TAX_RETURN_CATEGORIES.sole.expenses,
|
|
12422
|
+
...TAX_RETURN_CATEGORIES.other.expenses,
|
|
12423
|
+
]);
|
|
12424
|
+
}
|
|
12425
|
+
get netCash() {
|
|
12426
|
+
return this.workNetCash + this.propertyNetCash + this.soleNetCash + this.otherNetCash;
|
|
12427
|
+
}
|
|
12428
|
+
get netTotal() {
|
|
12429
|
+
return this.workNetTotal + this.propertyNetTotal + this.soleNetTotal + this.otherNetTotal;
|
|
12430
|
+
}
|
|
12416
12431
|
/**
|
|
12417
12432
|
* Work Net Total = Income - expenses - interest
|
|
12418
12433
|
* https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/217677990/Dashboard+Main
|