taxtank-core 0.33.43 → 0.33.45
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/transaction/transaction.collection.mjs +5 -2
- package/esm2022/src/lib/db/Enums/client/timezone.enum.mjs +3 -1
- package/esm2022/src/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.mjs +5 -6
- package/esm2022/src/lib/services/xlsx/xlsx.service.mjs +13 -14
- package/fesm2022/taxtank-core.mjs +19 -16
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/db/Enums/client/timezone.enum.d.ts +2 -0
- package/src/lib/models/report/my-tax/my-tax-business-income-or-losses/my-tax-business-losses/my-tax-business-losses.d.ts +1 -2
- package/src/lib/services/xlsx/xlsx.service.d.ts +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Dictionary } from '../../models';
|
1
|
+
import { CHART_ACCOUNTS_CATEGORIES, Dictionary } from '../../models';
|
2
2
|
import { ChartAccountsListEnum } from '../../db/Enums';
|
3
3
|
import { TankTypeEnum } from '../../db/Enums/tank-type.enum';
|
4
4
|
import { plainToClass } from 'class-transformer';
|
@@ -16,6 +16,9 @@ export class TransactionCollection extends TransactionBaseCollection {
|
|
16
16
|
* we use depreciations as expense transactions a lot
|
17
17
|
*/
|
18
18
|
constructor(transactions = [], depreciations = []) {
|
19
|
+
if (depreciations.length) {
|
20
|
+
transactions = transactions.filter(transaction => !CHART_ACCOUNTS_CATEGORIES.depreciation.includes(transaction.chartAccounts.category));
|
21
|
+
}
|
19
22
|
super([...transactions, ...depreciations.map((depreciation) => depreciation.toTransaction())]);
|
20
23
|
}
|
21
24
|
getSoleTransactions() {
|
@@ -228,4 +231,4 @@ export class TransactionCollection extends TransactionBaseCollection {
|
|
228
231
|
return this.filter(transaction => transaction.claimPercent > 0);
|
229
232
|
}
|
230
233
|
}
|
231
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNh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iAgICByZXR1cm4gdGhpcy5maWx0ZXIodHJhbnNhY3Rpb24gPT4gdHJhbnNhY3Rpb24uY2xhaW1QZXJjZW50ID4gMCk7XG4gIH1cbn1cbiJdfQ==
|
@@ -2,8 +2,10 @@ export var TimezoneEnum;
|
|
2
2
|
(function (TimezoneEnum) {
|
3
3
|
TimezoneEnum["PERTH"] = "Australia/Perth";
|
4
4
|
TimezoneEnum["EUCLA"] = "Australia/Eucla";
|
5
|
+
TimezoneEnum["DARWIN"] = "Australia/Darwin";
|
6
|
+
TimezoneEnum["BRISBANE"] = "Australia/Brisbane";
|
5
7
|
TimezoneEnum["ADELAIDE"] = "Australia/Adelaide";
|
6
8
|
TimezoneEnum["SYDNEY"] = "Australia/Sydney";
|
7
9
|
TimezoneEnum["LORD_HOWE"] = "Australia/Lord_Howe";
|
8
10
|
})(TimezoneEnum || (TimezoneEnum = {}));
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXpvbmUuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9kYi9FbnVtcy9jbGllbnQvdGltZXpvbmUuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxZQVFYO0FBUkQsV0FBWSxZQUFZO0lBQ3RCLHlDQUF5QixDQUFBO0lBQ3pCLHlDQUF5QixDQUFBO0lBQ3pCLDJDQUEyQixDQUFBO0lBQzNCLCtDQUErQixDQUFBO0lBQy9CLCtDQUErQixDQUFBO0lBQy9CLDJDQUEyQixDQUFBO0lBQzNCLGlEQUFpQyxDQUFBO0FBQ25DLENBQUMsRUFSVyxZQUFZLEtBQVosWUFBWSxRQVF2QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFRpbWV6b25lRW51bSB7XG4gIFBFUlRIID0gJ0F1c3RyYWxpYS9QZXJ0aCcsXG4gIEVVQ0xBID0gJ0F1c3RyYWxpYS9FdWNsYScsXG4gIERBUldJTiA9ICdBdXN0cmFsaWEvRGFyd2luJyxcbiAgQlJJU0JBTkUgPSAnQXVzdHJhbGlhL0JyaXNiYW5lJyxcbiAgQURFTEFJREUgPSAnQXVzdHJhbGlhL0FkZWxhaWRlJyxcbiAgU1lETkVZID0gJ0F1c3RyYWxpYS9TeWRuZXknLFxuICBMT1JEX0hPV0UgPSAnQXVzdHJhbGlhL0xvcmRfSG93ZScsXG59XG4iXX0=
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { TAX_RETURN_CATEGORIES
|
2
|
-
import { ChartAccountsCategoryEnum, ChartAccountsHeadingListEnum, ChartAccountsListEnum } from '../../../../../db/Enums';
|
1
|
+
import { TAX_RETURN_CATEGORIES } from '../../../../../collections';
|
2
|
+
import { ChartAccountsCategoryEnum, ChartAccountsHeadingListEnum, ChartAccountsListEnum, TaxReturnCategoryListEnum, TaxReturnItemEnum } from '../../../../../db/Enums';
|
3
3
|
import { TaxSummarySectionEnum } from '../../../../../db/Enums/tax-summary-section.enum';
|
4
4
|
/**
|
5
5
|
* Sole business information related to expense transactions (losses)
|
@@ -41,7 +41,7 @@ export class MyTaxBusinessLosses {
|
|
41
41
|
this.logbookExpensesAmount = Math.abs(transactions.getVehicleTransactions().sumBy('claimAmount')) +
|
42
42
|
depreciations.getVehicleDepreciations().sumBy('claimAmount');
|
43
43
|
this.otherExpensesAmount = Math.abs(transactions
|
44
|
-
.filterBy('chartAccounts.
|
44
|
+
.filterBy('chartAccounts.taxReturnItem.id', TaxReturnItemEnum.ALL_OTHER_EXPENSES)
|
45
45
|
.sumBy('claimAmount'));
|
46
46
|
this.totalNonPrimaryProductionExpensesAmount = Math.abs(transactions
|
47
47
|
.filterBy('chartAccounts.category', [ChartAccountsCategoryEnum.SOLE_EXPENSE])
|
@@ -59,12 +59,11 @@ export class MyTaxBusinessLosses {
|
|
59
59
|
this.deductionsForGeneralSmallBusinessPoolAmount = depreciations
|
60
60
|
.getSBPDepreciations()
|
61
61
|
.sumBy('claimAmount');
|
62
|
-
this.currentYearNetNonPrimaryIncomeOrLossesAmount =
|
63
|
-
.getBusinessClaimAmount();
|
62
|
+
this.currentYearNetNonPrimaryIncomeOrLossesAmount = taxSummary.sole.items.sumByCategoriesAndSection([TaxReturnCategoryListEnum.BUSINESS_INCOME_OR_LOSS], TaxSummarySectionEnum.SOLE_TANK);
|
64
63
|
this.priorYearsNonPrimaryLossesAmount = businessLosses.sumBy('openBalance');
|
65
64
|
this.netNonPrimaryIncomeOrLossesAmount = this.currentYearNetNonPrimaryIncomeOrLossesAmount -
|
66
65
|
this.priorYearsNonPrimaryLossesAmount;
|
67
66
|
this.deferredLossesAmount = taxSummary.sole.items.sumByCategoriesAndSection(TAX_RETURN_CATEGORIES.sole.lossCurrent, TaxSummarySectionEnum.SOLE_TANK);
|
68
67
|
}
|
69
68
|
}
|
70
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXktdGF4LWJ1c2luZXNzLWxvc3Nlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9tb2RlbHMvcmVwb3J0L215LXRheC9teS10YXgtYnVzaW5lc3MtaW5jb21lLW9yLWxvc3Nlcy9teS10YXgtYnVzaW5lc3MtbG9zc2VzL215LXRheC1idXNpbmVzcy1sb3NzZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUEwQixxQkFBcUIsRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQ2xILE9BQU8sRUFBRSx5QkFBeUIsRUFBRSw0QkFBN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vb2xBbW91bnQgPSBkZXByZWNpYXRpb25zXG4gICAgICAuZ2V0U0JQRGVwcmVjaWF0aW9ucygpXG4gICAgICAuc3VtQnkoJ2NsYWltQW1vdW50Jyk7XG4gICAgdGhpcy5jdXJyZW50WWVhck5ldE5vblByaW1hcnlJbmNvbWVPckxvc3Nlc0Ftb3VudCA9IHRheFN1bW1hcnkuc29sZS5pdGVtcy5zdW1CeUNhdGVnb3JpZXNBbmRTZWN0aW9uKFxuICAgICAgW1RheFJldHVybkNhdGVnb3J5TGlzdEVudW0uQlVTSU5FU1NfSU5DT01FX09SX0xPU1NdLFxuICAgICAgVGF4U3VtbWFyeVNlY3Rpb25FbnVtLlNPTEVfVEFOS1xuICAgIClcbiAgICB0aGlzLnByaW9yWWVhcnNOb25QcmltYXJ5TG9zc2VzQW1vdW50ID0gYnVzaW5lc3NMb3NzZXMuc3VtQnkoJ29wZW5CYWxhbmNlJyk7XG4gICAgdGhpcy5uZXROb25QcmltYXJ5SW5jb21lT3JMb3NzZXNBbW91bnQgPSB0aGlzLmN1cnJlbnRZZWFyTmV0Tm9uUHJpbWFyeUluY29tZU9yTG9zc2VzQW1vdW50IC1cbiAgICAgIHRoaXMucHJpb3JZZWFyc05vblByaW1hcnlMb3NzZXNBbW91bnQ7XG4gICAgdGhpcy5kZWZlcnJlZExvc3Nlc0Ftb3VudCA9IHRheFN1bW1hcnkuc29sZS5pdGVtcy5zdW1CeUNhdGVnb3JpZXNBbmRTZWN0aW9uKFxuICAgICAgVEFYX1JFVFVSTl9DQVRFR09SSUVTLnNvbGUubG9zc0N1cnJlbnQsXG4gICAgICBUYXhTdW1tYXJ5U2VjdGlvbkVudW0uU09MRV9UQU5LXG4gICAgKVxuICB9XG59XG4iXX0=
|
@@ -9,8 +9,8 @@ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.
|
|
9
9
|
export class XlsxService {
|
10
10
|
constructor() {
|
11
11
|
this.getFileName = (name) => {
|
12
|
-
|
13
|
-
|
12
|
+
const sheetName = name || 'ExportResult';
|
13
|
+
const fileName = `${sheetName}`;
|
14
14
|
return {
|
15
15
|
sheetName,
|
16
16
|
fileName
|
@@ -39,16 +39,15 @@ export class XlsxService {
|
|
39
39
|
// add caption for the current table
|
40
40
|
xlsx.utils.sheet_add_aoa(worksheet, [[data.caption?.innerText]], { origin: -1 });
|
41
41
|
// Prepare to add table data to the worksheet, processing each cell
|
42
|
-
const rows = Array.from(data.rows).map((row) => {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
});
|
42
|
+
const rows = Array.from(data.rows).map((row) => Array.from(row.cells).map((cell) => {
|
43
|
+
const cellValue = cell.innerText;
|
44
|
+
// Convert currency strings like "$0.00" to numbers
|
45
|
+
if (/^-?\$/.test(cellValue)) {
|
46
|
+
// @TODO vik fix
|
47
|
+
// cellValue = parseFloat(cellValue.replace('$', ''));
|
48
|
+
}
|
49
|
+
return cellValue;
|
50
|
+
}));
|
52
51
|
// Add the processed table data to the worksheet
|
53
52
|
xlsx.utils.sheet_add_aoa(worksheet, rows, { origin: -1 });
|
54
53
|
// set empty row after current table
|
@@ -70,7 +69,7 @@ export class XlsxService {
|
|
70
69
|
};
|
71
70
|
const exportData = exportableCollection.export(params);
|
72
71
|
const exportAoa = exportableCollection.getBodyAoa(exportData);
|
73
|
-
|
72
|
+
const { sheetName, fileName } = this.getFileName(name);
|
74
73
|
xlsx.utils.sheet_add_aoa(worksheet, [exportData.header], { origin: -1 });
|
75
74
|
// add table table data to the worksheet
|
76
75
|
xlsx.utils.sheet_add_aoa(worksheet, exportAoa, { origin: -1 });
|
@@ -92,4 +91,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
92
91
|
providedIn: 'root'
|
93
92
|
}]
|
94
93
|
}] });
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
94
|
+
//# sourceMappingURL=data:application/json;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YS5oZWFkZXJdLCB7IG9yaWdpbjogLTEgfSk7XG4gICAgLy8gYWRkIHRhYmxlIHRhYmxlIGRhdGEgdG8gdGhlIHdvcmtzaGVldFxuICAgIHhsc3gudXRpbHMuc2hlZXRfYWRkX2FvYSh3b3Jrc2hlZXQsIGV4cG9ydEFvYSwgeyBvcmlnaW46IC0xIH0pO1xuICAgIC8vIHNldCBlbXB0eSByb3cgYWZ0ZXIgY3VycmVudCB0YWJsZVxuICAgIHhsc3gudXRpbHMuc2hlZXRfYWRkX2FvYSh3b3Jrc2hlZXQsIFtdLCB7IG9yaWdpbjogLTEgfSk7XG5cbiAgICB4bHN4LnV0aWxzLmJvb2tfYXBwZW5kX3NoZWV0KHdvcmtib29rLCB3b3Jrc2hlZXQpO1xuICAgIGNvbnN0IGV4Y2VsRmlsZTogQmxvYlBhcnQgPSB4bHN4LndyaXRlKHdvcmtib29rLCB7IGJvb2tUeXBlOiAneGxzeCcsIHR5cGU6ICdhcnJheScgfSk7XG5cbiAgICBjb25zdCBkYXRhOiBCbG9iID0gbmV3IEJsb2IoW2V4Y2VsRmlsZV0sIHtcbiAgICAgIHR5cGU6IEVYQ0VMX1RZUEVcbiAgICB9KTtcbiAgICBGaWxlU2F2ZXIuc2F2ZUFzKGRhdGEsIGAke2ZpbGVOYW1lfS54bHN4YCk7XG4gIH1cbn1cbiJdfQ==
|
@@ -857,6 +857,8 @@ var TimezoneEnum;
|
|
857
857
|
(function (TimezoneEnum) {
|
858
858
|
TimezoneEnum["PERTH"] = "Australia/Perth";
|
859
859
|
TimezoneEnum["EUCLA"] = "Australia/Eucla";
|
860
|
+
TimezoneEnum["DARWIN"] = "Australia/Darwin";
|
861
|
+
TimezoneEnum["BRISBANE"] = "Australia/Brisbane";
|
860
862
|
TimezoneEnum["ADELAIDE"] = "Australia/Adelaide";
|
861
863
|
TimezoneEnum["SYDNEY"] = "Australia/Sydney";
|
862
864
|
TimezoneEnum["LORD_HOWE"] = "Australia/Lord_Howe";
|
@@ -6798,6 +6800,9 @@ class TransactionCollection extends TransactionBaseCollection {
|
|
6798
6800
|
* we use depreciations as expense transactions a lot
|
6799
6801
|
*/
|
6800
6802
|
constructor(transactions = [], depreciations = []) {
|
6803
|
+
if (depreciations.length) {
|
6804
|
+
transactions = transactions.filter(transaction => !CHART_ACCOUNTS_CATEGORIES.depreciation.includes(transaction.chartAccounts.category));
|
6805
|
+
}
|
6801
6806
|
super([...transactions, ...depreciations.map((depreciation) => depreciation.toTransaction())]);
|
6802
6807
|
}
|
6803
6808
|
getSoleTransactions() {
|
@@ -7382,7 +7387,7 @@ class MyTaxBusinessLosses {
|
|
7382
7387
|
this.logbookExpensesAmount = Math.abs(transactions.getVehicleTransactions().sumBy('claimAmount')) +
|
7383
7388
|
depreciations.getVehicleDepreciations().sumBy('claimAmount');
|
7384
7389
|
this.otherExpensesAmount = Math.abs(transactions
|
7385
|
-
.filterBy('chartAccounts.
|
7390
|
+
.filterBy('chartAccounts.taxReturnItem.id', TaxReturnItemEnum.ALL_OTHER_EXPENSES)
|
7386
7391
|
.sumBy('claimAmount'));
|
7387
7392
|
this.totalNonPrimaryProductionExpensesAmount = Math.abs(transactions
|
7388
7393
|
.filterBy('chartAccounts.category', [ChartAccountsCategoryEnum.SOLE_EXPENSE])
|
@@ -7400,8 +7405,7 @@ class MyTaxBusinessLosses {
|
|
7400
7405
|
this.deductionsForGeneralSmallBusinessPoolAmount = depreciations
|
7401
7406
|
.getSBPDepreciations()
|
7402
7407
|
.sumBy('claimAmount');
|
7403
|
-
this.currentYearNetNonPrimaryIncomeOrLossesAmount =
|
7404
|
-
.getBusinessClaimAmount();
|
7408
|
+
this.currentYearNetNonPrimaryIncomeOrLossesAmount = taxSummary.sole.items.sumByCategoriesAndSection([TaxReturnCategoryListEnum.BUSINESS_INCOME_OR_LOSS], TaxSummarySectionEnum.SOLE_TANK);
|
7405
7409
|
this.priorYearsNonPrimaryLossesAmount = businessLosses.sumBy('openBalance');
|
7406
7410
|
this.netNonPrimaryIncomeOrLossesAmount = this.currentYearNetNonPrimaryIncomeOrLossesAmount -
|
7407
7411
|
this.priorYearsNonPrimaryLossesAmount;
|
@@ -19429,8 +19433,8 @@ const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.
|
|
19429
19433
|
class XlsxService {
|
19430
19434
|
constructor() {
|
19431
19435
|
this.getFileName = (name) => {
|
19432
|
-
|
19433
|
-
|
19436
|
+
const sheetName = name || 'ExportResult';
|
19437
|
+
const fileName = `${sheetName}`;
|
19434
19438
|
return {
|
19435
19439
|
sheetName,
|
19436
19440
|
fileName
|
@@ -19459,16 +19463,15 @@ class XlsxService {
|
|
19459
19463
|
// add caption for the current table
|
19460
19464
|
xlsx.utils.sheet_add_aoa(worksheet, [[data.caption?.innerText]], { origin: -1 });
|
19461
19465
|
// Prepare to add table data to the worksheet, processing each cell
|
19462
|
-
const rows = Array.from(data.rows).map((row) => {
|
19463
|
-
|
19464
|
-
|
19465
|
-
|
19466
|
-
|
19467
|
-
|
19468
|
-
|
19469
|
-
|
19470
|
-
|
19471
|
-
});
|
19466
|
+
const rows = Array.from(data.rows).map((row) => Array.from(row.cells).map((cell) => {
|
19467
|
+
const cellValue = cell.innerText;
|
19468
|
+
// Convert currency strings like "$0.00" to numbers
|
19469
|
+
if (/^-?\$/.test(cellValue)) {
|
19470
|
+
// @TODO vik fix
|
19471
|
+
// cellValue = parseFloat(cellValue.replace('$', ''));
|
19472
|
+
}
|
19473
|
+
return cellValue;
|
19474
|
+
}));
|
19472
19475
|
// Add the processed table data to the worksheet
|
19473
19476
|
xlsx.utils.sheet_add_aoa(worksheet, rows, { origin: -1 });
|
19474
19477
|
// set empty row after current table
|
@@ -19490,7 +19493,7 @@ class XlsxService {
|
|
19490
19493
|
};
|
19491
19494
|
const exportData = exportableCollection.export(params);
|
19492
19495
|
const exportAoa = exportableCollection.getBodyAoa(exportData);
|
19493
|
-
|
19496
|
+
const { sheetName, fileName } = this.getFileName(name);
|
19494
19497
|
xlsx.utils.sheet_add_aoa(worksheet, [exportData.header], { origin: -1 });
|
19495
19498
|
// add table table data to the worksheet
|
19496
19499
|
xlsx.utils.sheet_add_aoa(worksheet, exportAoa, { origin: -1 });
|