taxtank-core 0.5.4 → 0.7.1

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.
Files changed (156) hide show
  1. package/bundles/taxtank-core.umd.js +443 -177
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/depreciation.collection.js +13 -2
  4. package/esm2015/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.js +20 -0
  5. package/esm2015/lib/collections/property/property.collection.js +72 -0
  6. package/esm2015/lib/db/Enums/property/property-category-list.enum.js +5 -0
  7. package/esm2015/lib/db/Enums/{property-depreciation-calculation.enum.js → property/property-depreciation-calculation.enum.js} +1 -1
  8. package/esm2015/lib/db/Enums/property/property-owner-access.enum.js +6 -0
  9. package/esm2015/lib/db/Enums/property/property-owner-status.enum.js +7 -0
  10. package/esm2015/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.js +9 -0
  11. package/esm2015/lib/db/Enums/property/property-sale/tax-exemption.enum.js +12 -0
  12. package/esm2015/lib/db/Models/bank-account-property.js +1 -1
  13. package/esm2015/lib/db/Models/depreciation-capital-project.js +1 -1
  14. package/esm2015/lib/db/Models/depreciation.js +1 -1
  15. package/esm2015/lib/db/Models/property/property-category-movement.js +3 -0
  16. package/esm2015/lib/db/Models/property/property-category.js +3 -0
  17. package/esm2015/lib/db/Models/property/property-document.js +3 -0
  18. package/esm2015/lib/db/Models/property/property-forecast.js +3 -0
  19. package/esm2015/lib/db/Models/property/property-owner.js +3 -0
  20. package/esm2015/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.js +3 -0
  21. package/esm2015/lib/db/Models/property/property-sale/property-sale.js +3 -0
  22. package/esm2015/lib/db/Models/property/property-sale/tax-exemption-metadata.js +3 -0
  23. package/esm2015/lib/db/Models/property/property-sale/tax-exemption.js +3 -0
  24. package/esm2015/lib/db/Models/property/property-subscription.js +3 -0
  25. package/esm2015/lib/db/Models/property/property-valuation.js +3 -0
  26. package/esm2015/lib/db/Models/property/property.js +3 -0
  27. package/esm2015/lib/db/Models/transaction-base.js +1 -1
  28. package/esm2015/lib/db/Models/transaction.js +1 -1
  29. package/esm2015/lib/db/Models/user.js +1 -1
  30. package/esm2015/lib/forms/abstract.form.js +11 -0
  31. package/esm2015/lib/forms/index.js +7 -0
  32. package/esm2015/lib/forms/login/login.form.js +11 -0
  33. package/esm2015/lib/forms/register/register-client.form.js +29 -0
  34. package/esm2015/lib/forms/register/register-firm.form.js +26 -0
  35. package/esm2015/lib/forms/user/password.form.js +11 -0
  36. package/esm2015/lib/forms/user/reset-password.form.js +10 -0
  37. package/esm2015/lib/interceptors/corelogic-interceptor.js +2 -2
  38. package/esm2015/lib/models/depreciation/depreciation.js +5 -1
  39. package/esm2015/lib/models/endpoint/endpoints.const.js +1 -2
  40. package/esm2015/lib/models/property/property-category-movement.js +2 -2
  41. package/esm2015/lib/models/property/property-category.js +2 -2
  42. package/esm2015/lib/models/property/property-document.js +2 -2
  43. package/esm2015/lib/models/property/property-equity-chart-data.js +3 -3
  44. package/esm2015/lib/models/property/property-forecast.js +2 -2
  45. package/esm2015/lib/models/property/property-owner.js +3 -3
  46. package/esm2015/lib/models/property/property-sale/property-sale-tax-exemption-metadata.js +4 -0
  47. package/esm2015/lib/models/property/property-sale/property-sale.js +19 -0
  48. package/esm2015/lib/models/property/property-sale/tax-exemption-metadata.js +4 -0
  49. package/esm2015/lib/models/property/property-sale/tax-exemption.js +4 -0
  50. package/esm2015/lib/models/property/property-subscription.js +2 -2
  51. package/esm2015/lib/models/property/property-valuation.js +2 -2
  52. package/esm2015/lib/models/property/property.js +88 -4
  53. package/esm2015/lib/services/depreciation/depreciation.service.js +1 -1
  54. package/esm2015/lib/services/property/corelogic/corelogic.service.js +46 -0
  55. package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +121 -0
  56. package/esm2015/lib/services/property/property-category/property-category.service.js +23 -0
  57. package/esm2015/lib/services/property/property-category-movement.service.js +1 -1
  58. package/esm2015/lib/services/property/property-document/property-document.service.js +70 -0
  59. package/esm2015/lib/services/property/{property-owner.service.js → property-owner/property-owner.service.js} +7 -7
  60. package/esm2015/lib/services/property/property-sale/property-sale.service.js +20 -0
  61. package/esm2015/lib/services/property/property-sale/tax-exemption/tax-exemption.service.js +21 -0
  62. package/esm2015/lib/services/property/property.service.js +1 -1
  63. package/esm2015/public-api.js +22 -14
  64. package/fesm2015/taxtank-core.js +361 -147
  65. package/fesm2015/taxtank-core.js.map +1 -1
  66. package/lib/collections/depreciation.collection.d.ts +4 -1
  67. package/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.d.ts +8 -0
  68. package/lib/collections/{property.collection.d.ts → property/property.collection.d.ts} +4 -4
  69. package/lib/db/Enums/property/property-category-list.enum.d.ts +3 -0
  70. package/lib/db/Enums/{property-depreciation-calculation.enum.d.ts → property/property-depreciation-calculation.enum.d.ts} +0 -0
  71. package/lib/db/Enums/{property-owner-access.enum.d.ts → property/property-owner-access.enum.d.ts} +0 -0
  72. package/lib/db/Enums/{property-owner-status.enum.d.ts → property/property-owner-status.enum.d.ts} +0 -0
  73. package/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.d.ts +5 -0
  74. package/lib/db/Enums/property/property-sale/tax-exemption.enum.d.ts +9 -0
  75. package/lib/db/Models/bank-account-property.d.ts +1 -1
  76. package/lib/db/Models/depreciation-capital-project.d.ts +1 -1
  77. package/lib/db/Models/depreciation.d.ts +1 -1
  78. package/lib/db/Models/{property-category-movement.d.ts → property/property-category-movement.d.ts} +1 -1
  79. package/lib/db/Models/{property-category.d.ts → property/property-category.d.ts} +1 -1
  80. package/lib/db/Models/{property-document.d.ts → property/property-document.d.ts} +1 -1
  81. package/lib/db/Models/{property-forecast.d.ts → property/property-forecast.d.ts} +0 -0
  82. package/lib/db/Models/{property-owner.d.ts → property/property-owner.d.ts} +4 -4
  83. package/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +8 -0
  84. package/lib/db/Models/property/property-sale/property-sale.d.ts +20 -0
  85. package/lib/db/Models/property/property-sale/tax-exemption-metadata.d.ts +6 -0
  86. package/lib/db/Models/property/property-sale/tax-exemption.d.ts +7 -0
  87. package/lib/db/Models/{property-subscription.d.ts → property/property-subscription.d.ts} +1 -1
  88. package/lib/db/Models/{property-valuation.d.ts → property/property-valuation.d.ts} +0 -0
  89. package/lib/db/Models/{property.d.ts → property/property.d.ts} +9 -8
  90. package/lib/db/Models/transaction-base.d.ts +1 -1
  91. package/lib/db/Models/transaction.d.ts +1 -1
  92. package/lib/db/Models/user.d.ts +3 -3
  93. package/lib/forms/abstract.form.d.ts +4 -0
  94. package/lib/forms/index.d.ts +6 -0
  95. package/lib/forms/login/login.form.d.ts +4 -0
  96. package/lib/forms/register/register-client.form.d.ts +5 -0
  97. package/lib/forms/register/register-firm.form.d.ts +7 -0
  98. package/lib/forms/user/password.form.d.ts +4 -0
  99. package/lib/forms/user/reset-password.form.d.ts +4 -0
  100. package/lib/interceptors/corelogic-interceptor.d.ts +1 -1
  101. package/lib/models/depreciation/depreciation.d.ts +1 -0
  102. package/lib/models/property/property-category-movement.d.ts +1 -1
  103. package/lib/models/property/property-category.d.ts +1 -1
  104. package/lib/models/property/property-document.d.ts +1 -1
  105. package/lib/models/property/property-equity-chart-data.d.ts +1 -1
  106. package/lib/models/property/property-forecast.d.ts +1 -1
  107. package/lib/models/property/property-owner.d.ts +1 -1
  108. package/lib/models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +3 -0
  109. package/lib/models/property/property-sale/property-sale.d.ts +8 -0
  110. package/lib/models/property/property-sale/tax-exemption-metadata.d.ts +3 -0
  111. package/lib/models/property/property-sale/tax-exemption.d.ts +3 -0
  112. package/lib/models/property/property-subscription.d.ts +1 -1
  113. package/lib/models/property/property-valuation.d.ts +1 -1
  114. package/lib/models/property/property.d.ts +34 -3
  115. package/lib/services/property/{corelogic.service.d.ts → corelogic/corelogic.service.d.ts} +1 -1
  116. package/lib/services/property/{property-calculation.service.d.ts → property-calculation/property-calculation.service.d.ts} +5 -5
  117. package/lib/services/property/{property-category.service.d.ts → property-category/property-category.service.d.ts} +3 -3
  118. package/lib/services/property/property-category-movement.service.d.ts +1 -1
  119. package/lib/services/property/{property-document.service.d.ts → property-document/property-document.service.d.ts} +4 -4
  120. package/lib/services/property/{property-owner.service.d.ts → property-owner/property-owner.service.d.ts} +4 -4
  121. package/lib/services/property/property-sale/property-sale.service.d.ts +10 -0
  122. package/lib/services/property/property-sale/tax-exemption/tax-exemption.service.d.ts +11 -0
  123. package/lib/services/property/property.service.d.ts +1 -1
  124. package/package.json +2 -1
  125. package/public-api.d.ts +21 -13
  126. package/esm2015/lib/collections/property.collection.js +0 -72
  127. package/esm2015/lib/db/Enums/property-owner-access.enum.js +0 -6
  128. package/esm2015/lib/db/Enums/property-owner-status.enum.js +0 -7
  129. package/esm2015/lib/db/Models/capital-cost-property.js +0 -3
  130. package/esm2015/lib/db/Models/capital-cost.js +0 -3
  131. package/esm2015/lib/db/Models/property-capital-cost.js +0 -3
  132. package/esm2015/lib/db/Models/property-category-movement.js +0 -3
  133. package/esm2015/lib/db/Models/property-category.js +0 -3
  134. package/esm2015/lib/db/Models/property-document.js +0 -3
  135. package/esm2015/lib/db/Models/property-forecast.js +0 -3
  136. package/esm2015/lib/db/Models/property-owner.js +0 -3
  137. package/esm2015/lib/db/Models/property-sold.js +0 -3
  138. package/esm2015/lib/db/Models/property-subscription.js +0 -3
  139. package/esm2015/lib/db/Models/property-valuation.js +0 -3
  140. package/esm2015/lib/db/Models/property.js +0 -3
  141. package/esm2015/lib/models/property/property-capital-cost.js +0 -4
  142. package/esm2015/lib/models/property/property-sold.js +0 -12
  143. package/esm2015/lib/services/property/corelogic.service.js +0 -46
  144. package/esm2015/lib/services/property/property-calculation.service.js +0 -121
  145. package/esm2015/lib/services/property/property-capital-cost.service.js +0 -46
  146. package/esm2015/lib/services/property/property-category.service.js +0 -23
  147. package/esm2015/lib/services/property/property-document.service.js +0 -68
  148. package/esm2015/lib/services/property/property-sold.service.js +0 -23
  149. package/lib/db/Models/capital-cost-property.d.ts +0 -13
  150. package/lib/db/Models/capital-cost.d.ts +0 -4
  151. package/lib/db/Models/property-capital-cost.d.ts +0 -13
  152. package/lib/db/Models/property-sold.d.ts +0 -12
  153. package/lib/models/property/property-capital-cost.d.ts +0 -3
  154. package/lib/models/property/property-sold.d.ts +0 -5
  155. package/lib/services/property/property-capital-cost.service.d.ts +0 -20
  156. package/lib/services/property/property-sold.service.d.ts +0 -13
@@ -19,7 +19,7 @@ import { __decorate, __awaiter } from 'tslib';
19
19
  import * as moment from 'moment';
20
20
  import { DateRange } from 'moment-range';
21
21
  import cloneDeep$1 from 'lodash/cloneDeep';
22
- import { Validators } from '@angular/forms';
22
+ import { Validators, FormGroup, FormControl } from '@angular/forms';
23
23
  import _ from 'lodash';
24
24
  import { EventSourcePolyfill } from 'event-source-polyfill/src/eventsource.min.js';
25
25
  import * as i1$1 from '@angular/router';
@@ -457,7 +457,6 @@ const ENDPOINTS = {
457
457
  BANK_TRANSACTIONS_DELETE: new Endpoint('DELETE', '\\/bank-transactions\\/\\d+'),
458
458
  BANK_TRANSACTIONS_IMPORT_POST: new Endpoint('POST', '\\/bank-transactions\\/\\d+\\/import'),
459
459
  BASIQ_ACCOUNTS_GET: new Endpoint('GET', '\\/basiq\\/\\accounts'),
460
- CAPITAL_COSTS_GET: new Endpoint('GET', '\\/capital-costs'),
461
460
  CHARTS_INCOME_GET: new Endpoint('GET', '\\/charts\\/\\incomes'),
462
461
  CHARTS_EXPENSES_GET: new Endpoint('GET', '\\/charts\\/\\expenses'),
463
462
  CHART_ACCOUNTS_GET: new Endpoint('GET', '\\/chart-accounts'),
@@ -1392,11 +1391,16 @@ class DepreciationCollection extends Collection {
1392
1391
  return sum + depreciation.claimAmount;
1393
1392
  }, 0);
1394
1393
  }
1395
- getClaimAmountByYear(year) {
1394
+ getClaimAmountByYear(year = +localStorage.getItem('financialYear')) {
1396
1395
  return this.items.reduce((sum, depreciation) => {
1397
1396
  return sum + depreciation.getClaimAmountByYear(year);
1398
1397
  }, 0);
1399
1398
  }
1399
+ getCloseBalanceByYear(year = +localStorage.getItem('financialYear')) {
1400
+ return this.items.reduce((sum, depreciation) => {
1401
+ return sum + depreciation.getCloseBalanceByYear(year);
1402
+ }, 0);
1403
+ }
1400
1404
  getCurrentYearForecastAmount() {
1401
1405
  return this.items.reduce((sum, depreciation) => {
1402
1406
  return sum + depreciation.getCurrentYearForecastAmount();
@@ -1417,6 +1421,12 @@ class DepreciationCollection extends Collection {
1417
1421
  getByPropertiesIds(ids) {
1418
1422
  return new DepreciationCollection(this.items.filter((depreciation) => { var _a; return ids.includes((_a = depreciation.property) === null || _a === void 0 ? void 0 : _a.id); }));
1419
1423
  }
1424
+ getWithCapitalProject() {
1425
+ return new DepreciationCollection(this.items.filter((depreciation) => !!depreciation.depreciationCapitalProject));
1426
+ }
1427
+ getWithoutCapitalProject() {
1428
+ return new DepreciationCollection(this.items.filter((depreciation) => !depreciation.depreciationCapitalProject));
1429
+ }
1420
1430
  getWithoutBorrowingExpenses() {
1421
1431
  return new DepreciationCollection(this.items.filter((depreciation) => !depreciation.isBorrowingExpense()));
1422
1432
  }
@@ -1760,9 +1770,9 @@ class PropertyCollection extends Collection {
1760
1770
  getOwnerOccupiedProperties() {
1761
1771
  return new PropertyCollection(this.items.filter((property) => property.category.isOwnerOccupied()));
1762
1772
  }
1763
- get earliestPurchaseDate() {
1773
+ get earliestContractDate() {
1764
1774
  return this.items.reduce((min, property) => {
1765
- return min < property.purchaseDate ? min : property.purchaseDate;
1775
+ return min < property.contractDate ? min : property.contractDate;
1766
1776
  }, new FinancialYear(new Date()).startDate);
1767
1777
  }
1768
1778
  /**
@@ -2799,6 +2809,15 @@ var VehicleLogbookPurposeEnum;
2799
2809
  VehicleLogbookPurposeEnum[VehicleLogbookPurposeEnum["PERSONAL"] = 2] = "PERSONAL";
2800
2810
  })(VehicleLogbookPurposeEnum || (VehicleLogbookPurposeEnum = {}));
2801
2811
 
2812
+ var TaxExemptionMetadataEnum;
2813
+ (function (TaxExemptionMetadataEnum) {
2814
+ // principle place of residence
2815
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["PPR_DAYS"] = 1] = "PPR_DAYS";
2816
+ // market value once it was moved, decimal
2817
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["MARKET_VALUE"] = 2] = "MARKET_VALUE";
2818
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["CLAIM_PERCENT"] = 3] = "CLAIM_PERCENT";
2819
+ })(TaxExemptionMetadataEnum || (TaxExemptionMetadataEnum = {}));
2820
+
2802
2821
  class Address$1 {
2803
2822
  }
2804
2823
 
@@ -3445,6 +3464,44 @@ __decorate([
3445
3464
  Type(() => Date)
3446
3465
  ], PropertyCategoryMovement.prototype, "toDate", void 0);
3447
3466
 
3467
+ var TaxExemptionEnum;
3468
+ (function (TaxExemptionEnum) {
3469
+ TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
3470
+ // principle place of residence
3471
+ TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
3472
+ TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
3473
+ TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
3474
+ TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
3475
+ TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
3476
+ TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
3477
+ })(TaxExemptionEnum || (TaxExemptionEnum = {}));
3478
+
3479
+ var PropertyCategoryListEnum;
3480
+ (function (PropertyCategoryListEnum) {
3481
+ PropertyCategoryListEnum[PropertyCategoryListEnum["OWNER_OCCUPIED"] = 3] = "OWNER_OCCUPIED";
3482
+ })(PropertyCategoryListEnum || (PropertyCategoryListEnum = {}));
3483
+
3484
+ class PropertySaleTaxExemptionMetadataCollection extends Collection {
3485
+ getPPRDays() {
3486
+ var _a, _b;
3487
+ return (_b = (_a = this.getByMetadataId(TaxExemptionMetadataEnum.PPR_DAYS)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
3488
+ }
3489
+ getMarketValue() {
3490
+ var _a, _b;
3491
+ return (_b = (_a = this.getByMetadataId(TaxExemptionMetadataEnum.MARKET_VALUE)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
3492
+ }
3493
+ getClaimPercent() {
3494
+ var _a, _b;
3495
+ return (_b = (_a = this.getByMetadataId(TaxExemptionMetadataEnum.CLAIM_PERCENT)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 100;
3496
+ }
3497
+ getByMetadataId(id) {
3498
+ return this.items.find((metadata) => metadata.metadata.id === id);
3499
+ }
3500
+ }
3501
+
3502
+ /**
3503
+ * propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
3504
+ */
3448
3505
  class Property extends Property$1 {
3449
3506
  get name() {
3450
3507
  return this.address.name;
@@ -3469,7 +3526,7 @@ class Property extends Property$1 {
3469
3526
  return this.photo;
3470
3527
  }
3471
3528
  get capitalCostsTotalAmount() {
3472
- return this.capitalCosts.reduce((sum, capitalCost) => sum + capitalCost.amount, 0);
3529
+ return this.stampDuty + this.legalFees + this.otherCapitalCosts;
3473
3530
  }
3474
3531
  get currentYearValuations() {
3475
3532
  return this.valuations.filter((valuation) => valuation.isCurrentYear());
@@ -3532,10 +3589,87 @@ class Property extends Property$1 {
3532
3589
  get isShared() {
3533
3590
  return this.owners.length > 1;
3534
3591
  }
3592
+ /**
3593
+ * purchase costs - claimed costs, except `ppr to investment` exemption,
3594
+ * in that case it's equal to market value, when property became an investment property
3595
+ */
3596
+ calculateCostBase(sale) {
3597
+ const marketValue = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata).getMarketValue();
3598
+ if (marketValue) {
3599
+ return marketValue;
3600
+ }
3601
+ return this.purchasePrice + this.capitalCostsTotalAmount + sale.structuralImprovementsWDV - sale.buildingAtCostClaimed;
3602
+ }
3603
+ /**
3604
+ * gross capital gain tax: sale costs - cost base
3605
+ */
3606
+ calculateCGT(sale) {
3607
+ return sale.price - sale.saleCostsTotalAmount - sale.capitalLoss - this.calculateCostBase(sale);
3608
+ }
3609
+ /**
3610
+ * net capital gain tax (includes tax exemptions)
3611
+ */
3612
+ calculateNetCGT(sale) {
3613
+ return this.getCGTExemptionRatio(sale) * this.calculateCGT(sale);
3614
+ }
3615
+ /**
3616
+ * guess tax exemption based on property details
3617
+ */
3618
+ getCGTExemption(sale) {
3619
+ if (sale.taxExemption) {
3620
+ return sale.taxExemption.id;
3621
+ }
3622
+ switch (true) {
3623
+ // exemption for main residence properties
3624
+ case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
3625
+ return TaxExemptionEnum.PPR;
3626
+ // exemption for investment properties owned for at least one year
3627
+ case this.getOwnershipDuration(sale, 'years') >= 1:
3628
+ return TaxExemptionEnum.ONE_YEAR_RULE;
3629
+ default:
3630
+ return null;
3631
+ }
3632
+ }
3633
+ /**
3634
+ * tax exemption can reduce cgt from 100% to less (up to zero)
3635
+ */
3636
+ getCGTExemptionRatio(sale) {
3637
+ var _a;
3638
+ const metadata = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata);
3639
+ switch ((_a = sale.taxExemption) === null || _a === void 0 ? void 0 : _a.id) {
3640
+ // 50% exemption for investments owned for at least one year
3641
+ case TaxExemptionEnum.ONE_YEAR_RULE:
3642
+ return 0.5;
3643
+ // investment property become main residence (exemption for main residence ownership duration)
3644
+ case TaxExemptionEnum.INVESTMENT_TO_PPR:
3645
+ const ownershipDays = this.getOwnershipDuration(sale);
3646
+ return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
3647
+ // main residence become investment (exemption for home office percent usage)
3648
+ case TaxExemptionEnum.PPR_TO_INVESTMENT:
3649
+ // 1 year CGT discount can still apply (on the income producing % if used for 12 months or more)
3650
+ const ratio = this.getOwnershipDuration(sale, 'years') >= 1 ? 0.5 : 1;
3651
+ return metadata.getClaimPercent() / 100 * ratio;
3652
+ // full exemption
3653
+ case TaxExemptionEnum.PPR:
3654
+ case TaxExemptionEnum.SIX_YEARS_RULE:
3655
+ case TaxExemptionEnum.TRANSFER:
3656
+ case TaxExemptionEnum.OTHER:
3657
+ return 0;
3658
+ // no exemption
3659
+ default:
3660
+ return 1;
3661
+ }
3662
+ }
3663
+ /**
3664
+ * ownership duration from purchase till sale
3665
+ */
3666
+ getOwnershipDuration(sale, unitOfTime = 'days') {
3667
+ return moment(sale.contractDate).diff(moment(this.contractDate), unitOfTime);
3668
+ }
3535
3669
  }
3536
3670
  __decorate([
3537
3671
  Type(() => Date)
3538
- ], Property.prototype, "purchaseDate", void 0);
3672
+ ], Property.prototype, "contractDate", void 0);
3539
3673
  __decorate([
3540
3674
  Type(() => Date)
3541
3675
  ], Property.prototype, "settlementDate", void 0);
@@ -4207,6 +4341,10 @@ class Depreciation extends Depreciation$1 {
4207
4341
  var _a;
4208
4342
  return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
4209
4343
  }
4344
+ getCloseBalanceByYear(year) {
4345
+ var _a;
4346
+ return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
4347
+ }
4210
4348
  get assetValue() {
4211
4349
  var _a;
4212
4350
  return ((_a = this.currentYearForecast) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
@@ -5574,12 +5712,6 @@ var OwnershipFilterOptionsEnum;
5574
5712
  OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["SHARED_PROPERTIES"] = 3] = "SHARED_PROPERTIES";
5575
5713
  })(OwnershipFilterOptionsEnum || (OwnershipFilterOptionsEnum = {}));
5576
5714
 
5577
- class PropertyCapitalCost$1 {
5578
- }
5579
-
5580
- class PropertyCapitalCost extends PropertyCapitalCost$1 {
5581
- }
5582
-
5583
5715
  /**
5584
5716
  * class contains equity information for passed financial year
5585
5717
  */
@@ -5737,14 +5869,14 @@ class PropertyEquityChartData {
5737
5869
  }, 0);
5738
5870
  }
5739
5871
  getMarketValueForPropertyByYear(property, year) {
5740
- if (new FinancialYear(property.purchaseDate).year > year) {
5872
+ if (new FinancialYear(property.contractDate).year > year) {
5741
5873
  return 0;
5742
5874
  }
5743
5875
  return (property.getForecastByYear(year) || first(property.forecasts)).marketValue;
5744
5876
  }
5745
5877
  getLoanBalanceForPropertyByYear(property, year) {
5746
5878
  var _a;
5747
- if (new FinancialYear(property.purchaseDate).year > year) {
5879
+ if (new FinancialYear(property.contractDate).year > year) {
5748
5880
  return 0;
5749
5881
  }
5750
5882
  return ((_a = property.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.loanBalance) || this.bankAccounts.getPropertyBalanceAmount(property.id);
@@ -5805,17 +5937,41 @@ __decorate([
5805
5937
  Transform(({ obj }) => obj.user ? obj.user.email : obj.invite.email)
5806
5938
  ], PropertyOwner.prototype, "email", void 0);
5807
5939
 
5808
- class PropertySold$1 {
5940
+ class PropertySale$1 {
5941
+ }
5942
+
5943
+ class PropertySaleTaxExemptionMetadata$1 {
5809
5944
  }
5810
5945
 
5811
- class PropertySold extends PropertySold$1 {
5946
+ class PropertySale extends PropertySale$1 {
5947
+ get saleCostsTotalAmount() {
5948
+ return this.commission + this.legalFees + this.otherCost;
5949
+ }
5812
5950
  }
5813
5951
  __decorate([
5814
5952
  Type(() => Date)
5815
- ], PropertySold.prototype, "date", void 0);
5953
+ ], PropertySale.prototype, "settlementDate", void 0);
5816
5954
  __decorate([
5817
5955
  Type(() => Date)
5818
- ], PropertySold.prototype, "contractDate", void 0);
5956
+ ], PropertySale.prototype, "contractDate", void 0);
5957
+ __decorate([
5958
+ Type(() => PropertySaleTaxExemptionMetadata$1)
5959
+ ], PropertySale.prototype, "taxExemptionMetadata", void 0);
5960
+
5961
+ class TaxExemption$1 {
5962
+ }
5963
+
5964
+ class TaxExemption extends TaxExemption$1 {
5965
+ }
5966
+
5967
+ class TaxExemptionMetadata$1 {
5968
+ }
5969
+
5970
+ class TaxExemptionMetadata extends TaxExemptionMetadata$1 {
5971
+ }
5972
+
5973
+ class PropertySaleTaxExemptionMetadata extends PropertySaleTaxExemptionMetadata$1 {
5974
+ }
5819
5975
 
5820
5976
  /**
5821
5977
  * Constant with list of URLs
@@ -8641,44 +8797,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
8641
8797
  }]
8642
8798
  }] });
8643
8799
 
8644
- /**
8645
- * Service for get property equity position half-year history chart data
8646
- */
8647
- class EquityPositionChartService {
8648
- constructor(http, environment) {
8649
- this.http = http;
8650
- this.environment = environment;
8651
- }
8652
- get() {
8653
- // @TODO refactor backend
8654
- return this.http.get(`${this.environment.apiV2}/properties/categories/equity`)
8655
- .pipe(map((response) => {
8656
- return response.map((item) => {
8657
- return plainToClass(ChartData, {
8658
- name: item.category.name,
8659
- data: item.equity.map((serie) => {
8660
- return plainToClass(ChartSerie, {
8661
- label: serie.date,
8662
- value: serie.amount
8663
- });
8664
- })
8665
- });
8666
- });
8667
- }));
8668
- }
8669
- }
8670
- EquityPositionChartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
8671
- EquityPositionChartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, providedIn: 'root' });
8672
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, decorators: [{
8673
- type: Injectable,
8674
- args: [{
8675
- providedIn: 'root'
8676
- }]
8677
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
8678
- type: Inject,
8679
- args: ['environment']
8680
- }] }]; } });
8681
-
8682
8800
  /**
8683
8801
  * Service for work with Property
8684
8802
  */
@@ -8910,46 +9028,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
8910
9028
  }]
8911
9029
  }] });
8912
9030
 
8913
- /**
8914
- * Service to work with capital costs
8915
- */
8916
- class PropertyCapitalCostService extends BaseRestService {
8917
- constructor() {
8918
- super(...arguments);
8919
- this.url = 'capital-costs';
8920
- this.modelClass = PropertyCapitalCost;
8921
- }
8922
- /**
8923
- * Get property capital costs
8924
- * @param property which params will be taken for list of property capital costs
8925
- */
8926
- getByProperty(property) {
8927
- // get list of capital costs items
8928
- return this.get()
8929
- .pipe(map((capitalCosts) => {
8930
- // property capital costs array
8931
- return capitalCosts.map((capitalCost) => {
8932
- var _a;
8933
- // return new Property capital cost object with capital cost and amount
8934
- return plainToClass(PropertyCapitalCost, {
8935
- capitalCost,
8936
- amount: ((_a = property.capitalCosts.find((existingCapitalCost) => {
8937
- return existingCapitalCost.capitalCost.id === capitalCost.id;
8938
- })) === null || _a === void 0 ? void 0 : _a.amount) || null
8939
- });
8940
- });
8941
- }));
8942
- }
8943
- }
8944
- PropertyCapitalCostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCapitalCostService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
8945
- PropertyCapitalCostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCapitalCostService, providedIn: 'root' });
8946
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCapitalCostService, decorators: [{
8947
- type: Injectable,
8948
- args: [{
8949
- providedIn: 'root'
8950
- }]
8951
- }] });
8952
-
8953
9031
  /**
8954
9032
  * Service for work with Property Categories
8955
9033
  */
@@ -8969,46 +9047,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
8969
9047
  }]
8970
9048
  }] });
8971
9049
 
8972
- class PropertyCategoryMovementService extends BaseRestService {
8973
- constructor() {
8974
- super(...arguments);
8975
- this.modelClass = PropertyCategoryMovement;
8976
- this.url = 'properties/category-movements';
8977
- }
8978
- add(model) {
8979
- return super.add(model).pipe(map((newMovement) => {
8980
- // @TODO Alex: we need to teach restService to dispatch events + limit list of methods (not all services have all 4 or even more considering batch requests) + collections
8981
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
8982
- return newMovement;
8983
- }));
8984
- }
8985
- update(model) {
8986
- return super.update(model).pipe(map((updatedMovement) => {
8987
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
8988
- return updatedMovement;
8989
- }));
8990
- }
8991
- delete(model) {
8992
- return super.delete(model).pipe(map(() => {
8993
- this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
8994
- }));
8995
- }
8996
- // @TODO Alex: Move to collection
8997
- getByPropertyId(id) {
8998
- return this.get().pipe(map((movements) => {
8999
- return movements.filter((movement) => movement.property.id === id);
9000
- }));
9001
- }
9002
- }
9003
- PropertyCategoryMovementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9004
- PropertyCategoryMovementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, providedIn: 'root' });
9005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, decorators: [{
9006
- type: Injectable,
9007
- args: [{
9008
- providedIn: 'root'
9009
- }]
9010
- }] });
9011
-
9012
9050
  /**
9013
9051
  * Class for work with Property Documents
9014
9052
  */
@@ -9031,8 +9069,10 @@ class PropertyDocumentService extends BaseRestService {
9031
9069
  formDataDocument.append('file', file);
9032
9070
  return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/documents`, formDataDocument).pipe(map((documentBase) => {
9033
9071
  const newDocument = plainToClass(PropertyDocument, documentBase);
9034
- this.cache.push(newDocument);
9035
- this.updateCache();
9072
+ if (this.cache) {
9073
+ this.cache.push(newDocument);
9074
+ this.updateCache();
9075
+ }
9036
9076
  return newDocument;
9037
9077
  }));
9038
9078
  }
@@ -9180,19 +9220,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
9180
9220
  args: ['environment']
9181
9221
  }] }]; } });
9182
9222
 
9223
+ class PropertySaleService extends BaseRestService {
9224
+ constructor() {
9225
+ super(...arguments);
9226
+ this.modelClass = PropertySale;
9227
+ this.url = 'properties/sales';
9228
+ }
9229
+ }
9230
+ PropertySaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9231
+ PropertySaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, providedIn: 'root' });
9232
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, decorators: [{
9233
+ type: Injectable,
9234
+ args: [{
9235
+ providedIn: 'root'
9236
+ }]
9237
+ }] });
9238
+
9183
9239
  /**
9184
- * Service for work with Property Sold
9240
+ * Service for get property equity position half-year history chart data
9185
9241
  */
9186
- class PropertySoldService extends BaseRestService {
9242
+ class EquityPositionChartService {
9243
+ constructor(http, environment) {
9244
+ this.http = http;
9245
+ this.environment = environment;
9246
+ }
9247
+ get() {
9248
+ // @TODO refactor backend
9249
+ return this.http.get(`${this.environment.apiV2}/properties/categories/equity`)
9250
+ .pipe(map((response) => {
9251
+ return response.map((item) => {
9252
+ return plainToClass(ChartData, {
9253
+ name: item.category.name,
9254
+ data: item.equity.map((serie) => {
9255
+ return plainToClass(ChartSerie, {
9256
+ label: serie.date,
9257
+ value: serie.amount
9258
+ });
9259
+ })
9260
+ });
9261
+ });
9262
+ }));
9263
+ }
9264
+ }
9265
+ EquityPositionChartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, deps: [{ token: i1.HttpClient }, { token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable });
9266
+ EquityPositionChartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, providedIn: 'root' });
9267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, decorators: [{
9268
+ type: Injectable,
9269
+ args: [{
9270
+ providedIn: 'root'
9271
+ }]
9272
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
9273
+ type: Inject,
9274
+ args: ['environment']
9275
+ }] }]; } });
9276
+
9277
+ class PropertyCategoryMovementService extends BaseRestService {
9187
9278
  constructor() {
9188
9279
  super(...arguments);
9189
- this.modelClass = PropertySold;
9190
- this.url = 'properties/sold';
9280
+ this.modelClass = PropertyCategoryMovement;
9281
+ this.url = 'properties/category-movements';
9282
+ }
9283
+ add(model) {
9284
+ return super.add(model).pipe(map((newMovement) => {
9285
+ // @TODO Alex: we need to teach restService to dispatch events + limit list of methods (not all services have all 4 or even more considering batch requests) + collections
9286
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
9287
+ return newMovement;
9288
+ }));
9289
+ }
9290
+ update(model) {
9291
+ return super.update(model).pipe(map((updatedMovement) => {
9292
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
9293
+ return updatedMovement;
9294
+ }));
9295
+ }
9296
+ delete(model) {
9297
+ return super.delete(model).pipe(map(() => {
9298
+ this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
9299
+ }));
9300
+ }
9301
+ // @TODO Alex: Move to collection
9302
+ getByPropertyId(id) {
9303
+ return this.get().pipe(map((movements) => {
9304
+ return movements.filter((movement) => movement.property.id === id);
9305
+ }));
9191
9306
  }
9192
9307
  }
9193
- PropertySoldService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySoldService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9194
- PropertySoldService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySoldService, providedIn: 'root' });
9195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySoldService, decorators: [{
9308
+ PropertyCategoryMovementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
9309
+ PropertyCategoryMovementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, providedIn: 'root' });
9310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, decorators: [{
9196
9311
  type: Injectable,
9197
9312
  args: [{
9198
9313
  providedIn: 'root'
@@ -10429,6 +10544,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
10429
10544
  }]
10430
10545
  }] });
10431
10546
 
10547
+ class TaxExemptionService extends BaseRestService {
10548
+ constructor() {
10549
+ super(...arguments);
10550
+ this.modelClass = TaxExemption;
10551
+ this.url = 'tax-exemptions';
10552
+ this.isHydra = true;
10553
+ }
10554
+ }
10555
+ TaxExemptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
10556
+ TaxExemptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, providedIn: 'root' });
10557
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, decorators: [{
10558
+ type: Injectable,
10559
+ args: [{
10560
+ providedIn: 'root'
10561
+ }]
10562
+ }] });
10563
+
10432
10564
  // deep clone for entity
10433
10565
  function cloneDeep(array) {
10434
10566
  return JSON.parse(JSON.stringify(array));
@@ -10499,6 +10631,88 @@ function taxReviewFilterPredicate(data, filter) {
10499
10631
  data.employee.fullName.toLowerCase().includes(filter);
10500
10632
  }
10501
10633
 
10634
+ class AbstractForm extends FormGroup {
10635
+ submit() {
10636
+ this.markAllAsTouched();
10637
+ if (!this.valid) {
10638
+ return null;
10639
+ }
10640
+ return this.value;
10641
+ }
10642
+ }
10643
+
10644
+ class LoginForm extends AbstractForm {
10645
+ constructor() {
10646
+ super({
10647
+ email: new FormControl(null, [Validators.required, Validators.email]),
10648
+ password: new FormControl(null, Validators.required)
10649
+ });
10650
+ }
10651
+ }
10652
+
10653
+ class PasswordForm extends AbstractForm {
10654
+ constructor() {
10655
+ super({
10656
+ password: new FormControl('', Validators.required),
10657
+ confirm: new FormControl('', Validators.required),
10658
+ });
10659
+ }
10660
+ }
10661
+
10662
+ class RegisterClientForm extends AbstractForm {
10663
+ constructor(referenceCode) {
10664
+ super({
10665
+ firstName: new FormControl('', [Validators.required]),
10666
+ lastName: new FormControl('', [Validators.required]),
10667
+ email: new FormControl('', [Validators.required, Validators.email]),
10668
+ password: new PasswordForm(),
10669
+ acceptTerms: new FormControl(false, [Validators.requiredTrue]),
10670
+ referenceCode: new FormControl(referenceCode)
10671
+ });
10672
+ }
10673
+ submit() {
10674
+ this.markAllAsTouched();
10675
+ if (!this.valid) {
10676
+ return null;
10677
+ }
10678
+ return {
10679
+ firstName: this.value.firstName,
10680
+ lastName: this.value.lastName,
10681
+ email: this.value.email,
10682
+ password: this.value.password.password,
10683
+ referenceCode: this.value.referenceCode
10684
+ };
10685
+ }
10686
+ }
10687
+
10688
+ class RegisterFirmForm extends AbstractForm {
10689
+ constructor(firmType, referenceCode) {
10690
+ super({
10691
+ name: new FormControl('', Validators.required),
10692
+ abn: new FormControl('', Validators.required),
10693
+ tan: new FormControl({ value: '', disabled: firmType !== FirmTypeEnum.ACCOUNTANT }, Validators.required),
10694
+ owner: new RegisterClientForm(referenceCode),
10695
+ type: new FormControl(firmType)
10696
+ });
10697
+ this.firmType = firmType;
10698
+ }
10699
+ submit() {
10700
+ this.markAllAsTouched();
10701
+ if (!this.valid) {
10702
+ return null;
10703
+ }
10704
+ return plainToClass(Firm, Object.assign({}, this.value, { owner: this.get('owner').submit() }));
10705
+ }
10706
+ }
10707
+
10708
+ class ResetPasswordForm extends AbstractForm {
10709
+ constructor() {
10710
+ super({
10711
+ email: new FormControl(null, [Validators.required, Validators.email]),
10712
+ });
10713
+ }
10714
+ }
10715
+
10502
10716
  /**
10503
10717
  * Public API Surface of tt-core
10504
10718
  */
@@ -10507,5 +10721,5 @@ function taxReviewFilterPredicate(data, filter) {
10507
10721
  * Generated bundle index. Do not edit.
10508
10722
  */
10509
10723
 
10510
- export { Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Bank, BankAccount, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalProjectService, ChartAccounts, ChartAccountsCategoryEnum, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEFAULT_VEHICLE_EXPENSE, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DataTable, DataTableColumn, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationReceipt, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSalaryEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookCollection, LogbookPeriod, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, Notification, NotificationService, Occupation, OccupationService, OwnershipFilterOptionsEnum, PdfService, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCapitalCost, PropertyCapitalCostService, PropertyCategory, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyOwner, PropertyOwnerAccessEnum, PropertyOwnerService, PropertyOwnerStatusEnum, PropertyService, PropertySold, PropertySoldService, PropertySubscription, PropertyValuation, RegistrationInvite, RegistrationInviteStatusEnum, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceTypeEnum, ServiceProduct, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SoleForecast, SoleForecastService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxReturnCategoryItem, TaxReturnCategoryItemCollection, TaxReturnCategoryItemDetails, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, Vehicle, VehicleClaim, VehicleClaimMethodEnum, VehicleLogbook, VehicleLogbookPurposeEnum, WORK_TANK_LOGBOOK_PURPOSE_OPTIONS, WorkTankService, XlsxService, cloneDeep, compare, compareMatOptions, createDate, displayMatOptions, enumToList, getDocIcon, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
10724
+ export { AbstractForm, Address, AddressService, AddressTypeEnum, AlphabetColorsEnum, AppEvent, AppEventTypeEnum, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Bank, BankAccount, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasiqJob, BasiqService, BasiqToken, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalProjectService, ChartAccounts, ChartAccountsCategoryEnum, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsListEnum, ChartAccountsMetadata, ChartAccountsMetadataListEnum, ChartAccountsMetadataTypeEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartData, ChartSerie, Chat, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEFAULT_VEHICLE_EXPENSE, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DataTable, DataTableColumn, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationReceipt, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, FinancialYear, Firm, FirmService, FirmTypeEnum, HeaderTitleService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSalaryEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookCollection, LogbookPeriod, LoginForm, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, Notification, NotificationService, Occupation, OccupationService, OwnershipFilterOptionsEnum, PasswordForm, PdfService, Phone, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyOwner, PropertyOwnerAccessEnum, PropertyOwnerService, PropertyOwnerStatusEnum, PropertySale, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, PropertySubscription, PropertyValuation, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ResetPasswordForm, SUBSCRIPTION_DESCRIPTION, SUBSCRIPTION_TITLE, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceTypeEnum, ServiceProduct, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SoleForecast, SoleForecastService, SpareDocumentSpareTypeEnum, SseService, SubscriptionService, SubscriptionTypeEnum, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionMetadata, TaxExemptionMetadataEnum, TaxExemptionService, TaxReturnCategoryItem, TaxReturnCategoryItemCollection, TaxReturnCategoryItemDetails, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionCalculationService, TransactionCollection, TransactionMetadata, TransactionOperationEnum, TransactionReceipt, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, Vehicle, VehicleClaim, VehicleClaimMethodEnum, VehicleLogbook, VehicleLogbookPurposeEnum, WORK_TANK_LOGBOOK_PURPOSE_OPTIONS, WorkTankService, XlsxService, cloneDeep, compare, compareMatOptions, createDate, displayMatOptions, enumToList, getDocIcon, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate };
10511
10725
  //# sourceMappingURL=taxtank-core.js.map