taxtank-core 0.5.4 → 0.6.0

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 (142) hide show
  1. package/bundles/taxtank-core.umd.js +338 -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/interceptors/corelogic-interceptor.js +2 -2
  31. package/esm2015/lib/models/depreciation/depreciation.js +5 -1
  32. package/esm2015/lib/models/endpoint/endpoints.const.js +1 -2
  33. package/esm2015/lib/models/property/property-category-movement.js +2 -2
  34. package/esm2015/lib/models/property/property-category.js +2 -2
  35. package/esm2015/lib/models/property/property-document.js +2 -2
  36. package/esm2015/lib/models/property/property-equity-chart-data.js +3 -3
  37. package/esm2015/lib/models/property/property-forecast.js +2 -2
  38. package/esm2015/lib/models/property/property-owner.js +3 -3
  39. package/esm2015/lib/models/property/property-sale/property-sale-tax-exemption-metadata.js +4 -0
  40. package/esm2015/lib/models/property/property-sale/property-sale.js +19 -0
  41. package/esm2015/lib/models/property/property-sale/tax-exemption-metadata.js +4 -0
  42. package/esm2015/lib/models/property/property-sale/tax-exemption.js +4 -0
  43. package/esm2015/lib/models/property/property-subscription.js +2 -2
  44. package/esm2015/lib/models/property/property-valuation.js +2 -2
  45. package/esm2015/lib/models/property/property.js +87 -4
  46. package/esm2015/lib/services/depreciation/depreciation.service.js +1 -1
  47. package/esm2015/lib/services/property/corelogic/corelogic.service.js +46 -0
  48. package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +121 -0
  49. package/esm2015/lib/services/property/property-category/property-category.service.js +23 -0
  50. package/esm2015/lib/services/property/property-category-movement.service.js +1 -1
  51. package/esm2015/lib/services/property/property-document/property-document.service.js +70 -0
  52. package/esm2015/lib/services/property/{property-owner.service.js → property-owner/property-owner.service.js} +7 -7
  53. package/esm2015/lib/services/property/property-sale/property-sale.service.js +20 -0
  54. package/esm2015/lib/services/property/property-sale/tax-exemption/tax-exemption.service.js +21 -0
  55. package/esm2015/lib/services/property/property.service.js +1 -1
  56. package/esm2015/public-api.js +18 -14
  57. package/fesm2015/taxtank-core.js +277 -146
  58. package/fesm2015/taxtank-core.js.map +1 -1
  59. package/lib/collections/depreciation.collection.d.ts +4 -1
  60. package/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.d.ts +8 -0
  61. package/lib/collections/{property.collection.d.ts → property/property.collection.d.ts} +4 -4
  62. package/lib/db/Enums/property/property-category-list.enum.d.ts +3 -0
  63. package/lib/db/Enums/{property-depreciation-calculation.enum.d.ts → property/property-depreciation-calculation.enum.d.ts} +0 -0
  64. package/lib/db/Enums/{property-owner-access.enum.d.ts → property/property-owner-access.enum.d.ts} +0 -0
  65. package/lib/db/Enums/{property-owner-status.enum.d.ts → property/property-owner-status.enum.d.ts} +0 -0
  66. package/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.d.ts +5 -0
  67. package/lib/db/Enums/property/property-sale/tax-exemption.enum.d.ts +9 -0
  68. package/lib/db/Models/bank-account-property.d.ts +1 -1
  69. package/lib/db/Models/depreciation-capital-project.d.ts +1 -1
  70. package/lib/db/Models/depreciation.d.ts +1 -1
  71. package/lib/db/Models/{property-category-movement.d.ts → property/property-category-movement.d.ts} +1 -1
  72. package/lib/db/Models/{property-category.d.ts → property/property-category.d.ts} +1 -1
  73. package/lib/db/Models/{property-document.d.ts → property/property-document.d.ts} +1 -1
  74. package/lib/db/Models/{property-forecast.d.ts → property/property-forecast.d.ts} +0 -0
  75. package/lib/db/Models/{property-owner.d.ts → property/property-owner.d.ts} +4 -4
  76. package/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +8 -0
  77. package/lib/db/Models/property/property-sale/property-sale.d.ts +20 -0
  78. package/lib/db/Models/property/property-sale/tax-exemption-metadata.d.ts +6 -0
  79. package/lib/db/Models/property/property-sale/tax-exemption.d.ts +6 -0
  80. package/lib/db/Models/{property-subscription.d.ts → property/property-subscription.d.ts} +1 -1
  81. package/lib/db/Models/{property-valuation.d.ts → property/property-valuation.d.ts} +0 -0
  82. package/lib/db/Models/{property.d.ts → property/property.d.ts} +9 -8
  83. package/lib/db/Models/transaction-base.d.ts +1 -1
  84. package/lib/db/Models/transaction.d.ts +1 -1
  85. package/lib/db/Models/user.d.ts +3 -3
  86. package/lib/interceptors/corelogic-interceptor.d.ts +1 -1
  87. package/lib/models/depreciation/depreciation.d.ts +1 -0
  88. package/lib/models/property/property-category-movement.d.ts +1 -1
  89. package/lib/models/property/property-category.d.ts +1 -1
  90. package/lib/models/property/property-document.d.ts +1 -1
  91. package/lib/models/property/property-equity-chart-data.d.ts +1 -1
  92. package/lib/models/property/property-forecast.d.ts +1 -1
  93. package/lib/models/property/property-owner.d.ts +1 -1
  94. package/lib/models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +3 -0
  95. package/lib/models/property/property-sale/property-sale.d.ts +8 -0
  96. package/lib/models/property/property-sale/tax-exemption-metadata.d.ts +3 -0
  97. package/lib/models/property/property-sale/tax-exemption.d.ts +3 -0
  98. package/lib/models/property/property-subscription.d.ts +1 -1
  99. package/lib/models/property/property-valuation.d.ts +1 -1
  100. package/lib/models/property/property.d.ts +34 -3
  101. package/lib/services/property/{corelogic.service.d.ts → corelogic/corelogic.service.d.ts} +1 -1
  102. package/lib/services/property/{property-calculation.service.d.ts → property-calculation/property-calculation.service.d.ts} +5 -5
  103. package/lib/services/property/{property-category.service.d.ts → property-category/property-category.service.d.ts} +3 -3
  104. package/lib/services/property/property-category-movement.service.d.ts +1 -1
  105. package/lib/services/property/{property-document.service.d.ts → property-document/property-document.service.d.ts} +4 -4
  106. package/lib/services/property/{property-owner.service.d.ts → property-owner/property-owner.service.d.ts} +4 -4
  107. package/lib/services/property/property-sale/property-sale.service.d.ts +10 -0
  108. package/lib/services/property/property-sale/tax-exemption/tax-exemption.service.d.ts +11 -0
  109. package/lib/services/property/property.service.d.ts +1 -1
  110. package/package.json +1 -1
  111. package/public-api.d.ts +17 -13
  112. package/esm2015/lib/collections/property.collection.js +0 -72
  113. package/esm2015/lib/db/Enums/property-owner-access.enum.js +0 -6
  114. package/esm2015/lib/db/Enums/property-owner-status.enum.js +0 -7
  115. package/esm2015/lib/db/Models/capital-cost-property.js +0 -3
  116. package/esm2015/lib/db/Models/capital-cost.js +0 -3
  117. package/esm2015/lib/db/Models/property-capital-cost.js +0 -3
  118. package/esm2015/lib/db/Models/property-category-movement.js +0 -3
  119. package/esm2015/lib/db/Models/property-category.js +0 -3
  120. package/esm2015/lib/db/Models/property-document.js +0 -3
  121. package/esm2015/lib/db/Models/property-forecast.js +0 -3
  122. package/esm2015/lib/db/Models/property-owner.js +0 -3
  123. package/esm2015/lib/db/Models/property-sold.js +0 -3
  124. package/esm2015/lib/db/Models/property-subscription.js +0 -3
  125. package/esm2015/lib/db/Models/property-valuation.js +0 -3
  126. package/esm2015/lib/db/Models/property.js +0 -3
  127. package/esm2015/lib/models/property/property-capital-cost.js +0 -4
  128. package/esm2015/lib/models/property/property-sold.js +0 -12
  129. package/esm2015/lib/services/property/corelogic.service.js +0 -46
  130. package/esm2015/lib/services/property/property-calculation.service.js +0 -121
  131. package/esm2015/lib/services/property/property-capital-cost.service.js +0 -46
  132. package/esm2015/lib/services/property/property-category.service.js +0 -23
  133. package/esm2015/lib/services/property/property-document.service.js +0 -68
  134. package/esm2015/lib/services/property/property-sold.service.js +0 -23
  135. package/lib/db/Models/capital-cost-property.d.ts +0 -13
  136. package/lib/db/Models/capital-cost.d.ts +0 -4
  137. package/lib/db/Models/property-capital-cost.d.ts +0 -13
  138. package/lib/db/Models/property-sold.d.ts +0 -12
  139. package/lib/models/property/property-capital-cost.d.ts +0 -3
  140. package/lib/models/property/property-sold.d.ts +0 -5
  141. package/lib/services/property/property-capital-cost.service.d.ts +0 -20
  142. package/lib/services/property/property-sold.service.d.ts +0 -13
@@ -830,7 +830,6 @@
830
830
  BANK_TRANSACTIONS_DELETE: new Endpoint('DELETE', '\\/bank-transactions\\/\\d+'),
831
831
  BANK_TRANSACTIONS_IMPORT_POST: new Endpoint('POST', '\\/bank-transactions\\/\\d+\\/import'),
832
832
  BASIQ_ACCOUNTS_GET: new Endpoint('GET', '\\/basiq\\/\\accounts'),
833
- CAPITAL_COSTS_GET: new Endpoint('GET', '\\/capital-costs'),
834
833
  CHARTS_INCOME_GET: new Endpoint('GET', '\\/charts\\/\\incomes'),
835
834
  CHARTS_EXPENSES_GET: new Endpoint('GET', '\\/charts\\/\\expenses'),
836
835
  CHART_ACCOUNTS_GET: new Endpoint('GET', '\\/chart-accounts'),
@@ -1943,10 +1942,17 @@
1943
1942
  configurable: true
1944
1943
  });
1945
1944
  DepreciationCollection.prototype.getClaimAmountByYear = function (year) {
1945
+ if (year === void 0) { year = +localStorage.getItem('financialYear'); }
1946
1946
  return this.items.reduce(function (sum, depreciation) {
1947
1947
  return sum + depreciation.getClaimAmountByYear(year);
1948
1948
  }, 0);
1949
1949
  };
1950
+ DepreciationCollection.prototype.getCloseBalanceByYear = function (year) {
1951
+ if (year === void 0) { year = +localStorage.getItem('financialYear'); }
1952
+ return this.items.reduce(function (sum, depreciation) {
1953
+ return sum + depreciation.getCloseBalanceByYear(year);
1954
+ }, 0);
1955
+ };
1950
1956
  DepreciationCollection.prototype.getCurrentYearForecastAmount = function () {
1951
1957
  return this.items.reduce(function (sum, depreciation) {
1952
1958
  return sum + depreciation.getCurrentYearForecastAmount();
@@ -1971,6 +1977,12 @@
1971
1977
  DepreciationCollection.prototype.getByPropertiesIds = function (ids) {
1972
1978
  return new DepreciationCollection(this.items.filter(function (depreciation) { var _a; return ids.includes((_a = depreciation.property) === null || _a === void 0 ? void 0 : _a.id); }));
1973
1979
  };
1980
+ DepreciationCollection.prototype.getWithCapitalProject = function () {
1981
+ return new DepreciationCollection(this.items.filter(function (depreciation) { return !!depreciation.depreciationCapitalProject; }));
1982
+ };
1983
+ DepreciationCollection.prototype.getWithoutCapitalProject = function () {
1984
+ return new DepreciationCollection(this.items.filter(function (depreciation) { return !depreciation.depreciationCapitalProject; }));
1985
+ };
1974
1986
  DepreciationCollection.prototype.getWithoutBorrowingExpenses = function () {
1975
1987
  return new DepreciationCollection(this.items.filter(function (depreciation) { return !depreciation.isBorrowingExpense(); }));
1976
1988
  };
@@ -2406,10 +2418,10 @@
2406
2418
  PropertyCollection.prototype.getOwnerOccupiedProperties = function () {
2407
2419
  return new PropertyCollection(this.items.filter(function (property) { return property.category.isOwnerOccupied(); }));
2408
2420
  };
2409
- Object.defineProperty(PropertyCollection.prototype, "earliestPurchaseDate", {
2421
+ Object.defineProperty(PropertyCollection.prototype, "earliestContractDate", {
2410
2422
  get: function () {
2411
2423
  return this.items.reduce(function (min, property) {
2412
- return min < property.purchaseDate ? min : property.purchaseDate;
2424
+ return min < property.contractDate ? min : property.contractDate;
2413
2425
  }, new FinancialYear(new Date()).startDate);
2414
2426
  },
2415
2427
  enumerable: false,
@@ -3589,6 +3601,15 @@
3589
3601
  VehicleLogbookPurposeEnum[VehicleLogbookPurposeEnum["PERSONAL"] = 2] = "PERSONAL";
3590
3602
  })(exports.VehicleLogbookPurposeEnum || (exports.VehicleLogbookPurposeEnum = {}));
3591
3603
 
3604
+ exports.TaxExemptionMetadataEnum = void 0;
3605
+ (function (TaxExemptionMetadataEnum) {
3606
+ // principle place of residence
3607
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["PPR_DAYS"] = 1] = "PPR_DAYS";
3608
+ // market value once it was moved, decimal
3609
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["MARKET_VALUE"] = 2] = "MARKET_VALUE";
3610
+ TaxExemptionMetadataEnum[TaxExemptionMetadataEnum["CLAIM_PERCENT"] = 3] = "CLAIM_PERCENT";
3611
+ })(exports.TaxExemptionMetadataEnum || (exports.TaxExemptionMetadataEnum = {}));
3612
+
3592
3613
  var Address$1 = /** @class */ (function () {
3593
3614
  function Address() {
3594
3615
  }
@@ -4509,6 +4530,49 @@
4509
4530
  classTransformer.Type(function () { return Date; })
4510
4531
  ], PropertyCategoryMovement.prototype, "toDate", void 0);
4511
4532
 
4533
+ var TaxExemptionEnum;
4534
+ (function (TaxExemptionEnum) {
4535
+ TaxExemptionEnum[TaxExemptionEnum["ONE_YEAR_RULE"] = 1] = "ONE_YEAR_RULE";
4536
+ // principle place of residence
4537
+ TaxExemptionEnum[TaxExemptionEnum["PPR"] = 2] = "PPR";
4538
+ TaxExemptionEnum[TaxExemptionEnum["SIX_YEARS_RULE"] = 3] = "SIX_YEARS_RULE";
4539
+ TaxExemptionEnum[TaxExemptionEnum["INVESTMENT_TO_PPR"] = 4] = "INVESTMENT_TO_PPR";
4540
+ TaxExemptionEnum[TaxExemptionEnum["PPR_TO_INVESTMENT"] = 5] = "PPR_TO_INVESTMENT";
4541
+ TaxExemptionEnum[TaxExemptionEnum["TRANSFER"] = 6] = "TRANSFER";
4542
+ TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
4543
+ })(TaxExemptionEnum || (TaxExemptionEnum = {}));
4544
+
4545
+ var PropertyCategoryListEnum;
4546
+ (function (PropertyCategoryListEnum) {
4547
+ PropertyCategoryListEnum[PropertyCategoryListEnum["OWNER_OCCUPIED"] = 3] = "OWNER_OCCUPIED";
4548
+ })(PropertyCategoryListEnum || (PropertyCategoryListEnum = {}));
4549
+
4550
+ var PropertySaleTaxExemptionMetadataCollection = /** @class */ (function (_super) {
4551
+ __extends(PropertySaleTaxExemptionMetadataCollection, _super);
4552
+ function PropertySaleTaxExemptionMetadataCollection() {
4553
+ return _super !== null && _super.apply(this, arguments) || this;
4554
+ }
4555
+ PropertySaleTaxExemptionMetadataCollection.prototype.getPPRDays = function () {
4556
+ var _a, _b;
4557
+ return (_b = (_a = this.getByMetadataId(exports.TaxExemptionMetadataEnum.PPR_DAYS)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
4558
+ };
4559
+ PropertySaleTaxExemptionMetadataCollection.prototype.getMarketValue = function () {
4560
+ var _a, _b;
4561
+ return (_b = (_a = this.getByMetadataId(exports.TaxExemptionMetadataEnum.MARKET_VALUE)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
4562
+ };
4563
+ PropertySaleTaxExemptionMetadataCollection.prototype.getClaimPercent = function () {
4564
+ var _a, _b;
4565
+ return (_b = (_a = this.getByMetadataId(exports.TaxExemptionMetadataEnum.CLAIM_PERCENT)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 100;
4566
+ };
4567
+ PropertySaleTaxExemptionMetadataCollection.prototype.getByMetadataId = function (id) {
4568
+ return this.items.find(function (metadata) { return metadata.metadata.id === id; });
4569
+ };
4570
+ return PropertySaleTaxExemptionMetadataCollection;
4571
+ }(Collection));
4572
+
4573
+ /**
4574
+ * propertySale docs - https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4209508353/Property+Sold+button
4575
+ */
4512
4576
  var Property = /** @class */ (function (_super) {
4513
4577
  __extends(Property, _super);
4514
4578
  function Property() {
@@ -4546,7 +4610,7 @@
4546
4610
  };
4547
4611
  Object.defineProperty(Property.prototype, "capitalCostsTotalAmount", {
4548
4612
  get: function () {
4549
- return this.capitalCosts.reduce(function (sum, capitalCost) { return sum + capitalCost.amount; }, 0);
4613
+ return this.stampDuty + this.legalFees + this.otherCapitalCosts;
4550
4614
  },
4551
4615
  enumerable: false,
4552
4616
  configurable: true
@@ -4664,11 +4728,88 @@
4664
4728
  enumerable: false,
4665
4729
  configurable: true
4666
4730
  });
4731
+ /**
4732
+ * purchase costs - claimed costs, except `ppr to investment` exemption,
4733
+ * in that case it's equal to market value, when property became an investment property
4734
+ */
4735
+ Property.prototype.calculateCostBase = function (sale) {
4736
+ var marketValue = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata).getMarketValue();
4737
+ if (marketValue) {
4738
+ return marketValue;
4739
+ }
4740
+ return this.purchasePrice + this.capitalCostsTotalAmount + sale.structuralImprovementsWDV - sale.buildingAtCostClaimed;
4741
+ };
4742
+ /**
4743
+ * gross capital gain tax: sale costs - cost base
4744
+ */
4745
+ Property.prototype.calculateCGT = function (sale) {
4746
+ console.log(sale.price, sale.saleCostsTotalAmount, sale.capitalLoss, this.calculateCostBase(sale));
4747
+ return sale.price - sale.saleCostsTotalAmount - sale.capitalLoss - this.calculateCostBase(sale);
4748
+ };
4749
+ /**
4750
+ * net capital gain tax (includes tax exemptions)
4751
+ */
4752
+ Property.prototype.calculateNetCGT = function (sale) {
4753
+ return this.getCGTExemptionRatio(sale) * this.calculateCGT(sale);
4754
+ };
4755
+ /**
4756
+ * guess tax exemption based on property details
4757
+ */
4758
+ Property.prototype.getCGTExemption = function (sale) {
4759
+ if (sale.taxExemption) {
4760
+ return sale.taxExemption.id;
4761
+ }
4762
+ switch (true) {
4763
+ // exemption for main residence properties
4764
+ case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
4765
+ return TaxExemptionEnum.PPR;
4766
+ // exemption for investment properties owned for at least one year
4767
+ case this.getOwnershipDuration(sale, 'years') >= 1:
4768
+ return TaxExemptionEnum.ONE_YEAR_RULE;
4769
+ default:
4770
+ return null;
4771
+ }
4772
+ };
4773
+ /**
4774
+ * tax exemption can reduce cgt from 100% to less (up to zero)
4775
+ */
4776
+ Property.prototype.getCGTExemptionRatio = function (sale) {
4777
+ var _a;
4778
+ var metadata = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata);
4779
+ switch ((_a = sale.taxExemption) === null || _a === void 0 ? void 0 : _a.id) {
4780
+ // 50% exemption for investments owned for at least one year
4781
+ case TaxExemptionEnum.ONE_YEAR_RULE:
4782
+ return 0.5;
4783
+ // investment property become main residence (exemption for main residence ownership duration)
4784
+ case TaxExemptionEnum.INVESTMENT_TO_PPR:
4785
+ var ownershipDays = this.getOwnershipDuration(sale);
4786
+ return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
4787
+ // main residence become investment (exemption for home office percent usage)
4788
+ case TaxExemptionEnum.PPR_TO_INVESTMENT:
4789
+ return metadata.getClaimPercent() / 100;
4790
+ // full exemption
4791
+ case TaxExemptionEnum.PPR:
4792
+ case TaxExemptionEnum.SIX_YEARS_RULE:
4793
+ case TaxExemptionEnum.TRANSFER:
4794
+ case TaxExemptionEnum.OTHER:
4795
+ return 0;
4796
+ // no exemption
4797
+ default:
4798
+ return 1;
4799
+ }
4800
+ };
4801
+ /**
4802
+ * ownership duration from purchase till sale
4803
+ */
4804
+ Property.prototype.getOwnershipDuration = function (sale, unitOfTime) {
4805
+ if (unitOfTime === void 0) { unitOfTime = 'days'; }
4806
+ return moment__namespace(sale.contractDate).diff(moment__namespace(this.contractDate), unitOfTime);
4807
+ };
4667
4808
  return Property;
4668
4809
  }(Property$1));
4669
4810
  __decorate([
4670
4811
  classTransformer.Type(function () { return Date; })
4671
- ], Property.prototype, "purchaseDate", void 0);
4812
+ ], Property.prototype, "contractDate", void 0);
4672
4813
  __decorate([
4673
4814
  classTransformer.Type(function () { return Date; })
4674
4815
  ], Property.prototype, "settlementDate", void 0);
@@ -5525,6 +5666,10 @@
5525
5666
  var _a;
5526
5667
  return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
5527
5668
  };
5669
+ Depreciation.prototype.getCloseBalanceByYear = function (year) {
5670
+ var _a;
5671
+ return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
5672
+ };
5528
5673
  Object.defineProperty(Depreciation.prototype, "assetValue", {
5529
5674
  get: function () {
5530
5675
  var _a;
@@ -7164,20 +7309,6 @@
7164
7309
  OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["SHARED_PROPERTIES"] = 3] = "SHARED_PROPERTIES";
7165
7310
  })(exports.OwnershipFilterOptionsEnum || (exports.OwnershipFilterOptionsEnum = {}));
7166
7311
 
7167
- var PropertyCapitalCost$1 = /** @class */ (function () {
7168
- function PropertyCapitalCost() {
7169
- }
7170
- return PropertyCapitalCost;
7171
- }());
7172
-
7173
- var PropertyCapitalCost = /** @class */ (function (_super) {
7174
- __extends(PropertyCapitalCost, _super);
7175
- function PropertyCapitalCost() {
7176
- return _super !== null && _super.apply(this, arguments) || this;
7177
- }
7178
- return PropertyCapitalCost;
7179
- }(PropertyCapitalCost$1));
7180
-
7181
7312
  /**
7182
7313
  * class contains equity information for passed financial year
7183
7314
  */
@@ -7343,14 +7474,14 @@
7343
7474
  }, 0);
7344
7475
  };
7345
7476
  PropertyEquityChartData.prototype.getMarketValueForPropertyByYear = function (property, year) {
7346
- if (new FinancialYear(property.purchaseDate).year > year) {
7477
+ if (new FinancialYear(property.contractDate).year > year) {
7347
7478
  return 0;
7348
7479
  }
7349
7480
  return (property.getForecastByYear(year) || first__default["default"](property.forecasts)).marketValue;
7350
7481
  };
7351
7482
  PropertyEquityChartData.prototype.getLoanBalanceForPropertyByYear = function (property, year) {
7352
7483
  var _a;
7353
- if (new FinancialYear(property.purchaseDate).year > year) {
7484
+ if (new FinancialYear(property.contractDate).year > year) {
7354
7485
  return 0;
7355
7486
  }
7356
7487
  return ((_a = property.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.loanBalance) || this.bankAccounts.getPropertyBalanceAmount(property.id);
@@ -7431,25 +7562,77 @@
7431
7562
  })
7432
7563
  ], PropertyOwner.prototype, "email", void 0);
7433
7564
 
7434
- var PropertySold$1 = /** @class */ (function () {
7435
- function PropertySold() {
7565
+ var PropertySale$1 = /** @class */ (function () {
7566
+ function PropertySale() {
7436
7567
  }
7437
- return PropertySold;
7568
+ return PropertySale;
7438
7569
  }());
7439
7570
 
7440
- var PropertySold = /** @class */ (function (_super) {
7441
- __extends(PropertySold, _super);
7442
- function PropertySold() {
7571
+ var PropertySaleTaxExemptionMetadata$1 = /** @class */ (function () {
7572
+ function PropertySaleTaxExemptionMetadata() {
7573
+ }
7574
+ return PropertySaleTaxExemptionMetadata;
7575
+ }());
7576
+
7577
+ var PropertySale = /** @class */ (function (_super) {
7578
+ __extends(PropertySale, _super);
7579
+ function PropertySale() {
7443
7580
  return _super !== null && _super.apply(this, arguments) || this;
7444
7581
  }
7445
- return PropertySold;
7446
- }(PropertySold$1));
7582
+ Object.defineProperty(PropertySale.prototype, "saleCostsTotalAmount", {
7583
+ get: function () {
7584
+ return this.commission + this.legalFees + this.otherCost;
7585
+ },
7586
+ enumerable: false,
7587
+ configurable: true
7588
+ });
7589
+ return PropertySale;
7590
+ }(PropertySale$1));
7447
7591
  __decorate([
7448
7592
  classTransformer.Type(function () { return Date; })
7449
- ], PropertySold.prototype, "date", void 0);
7593
+ ], PropertySale.prototype, "settlementDate", void 0);
7450
7594
  __decorate([
7451
7595
  classTransformer.Type(function () { return Date; })
7452
- ], PropertySold.prototype, "contractDate", void 0);
7596
+ ], PropertySale.prototype, "contractDate", void 0);
7597
+ __decorate([
7598
+ classTransformer.Type(function () { return PropertySaleTaxExemptionMetadata$1; })
7599
+ ], PropertySale.prototype, "taxExemptionMetadata", void 0);
7600
+
7601
+ var TaxExemption$1 = /** @class */ (function () {
7602
+ function TaxExemption() {
7603
+ }
7604
+ return TaxExemption;
7605
+ }());
7606
+
7607
+ var TaxExemption = /** @class */ (function (_super) {
7608
+ __extends(TaxExemption, _super);
7609
+ function TaxExemption() {
7610
+ return _super !== null && _super.apply(this, arguments) || this;
7611
+ }
7612
+ return TaxExemption;
7613
+ }(TaxExemption$1));
7614
+
7615
+ var TaxExemptionMetadata$1 = /** @class */ (function () {
7616
+ function TaxExemptionMetadata() {
7617
+ }
7618
+ return TaxExemptionMetadata;
7619
+ }());
7620
+
7621
+ var TaxExemptionMetadata = /** @class */ (function (_super) {
7622
+ __extends(TaxExemptionMetadata, _super);
7623
+ function TaxExemptionMetadata() {
7624
+ return _super !== null && _super.apply(this, arguments) || this;
7625
+ }
7626
+ return TaxExemptionMetadata;
7627
+ }(TaxExemptionMetadata$1));
7628
+
7629
+ var PropertySaleTaxExemptionMetadata = /** @class */ (function (_super) {
7630
+ __extends(PropertySaleTaxExemptionMetadata, _super);
7631
+ function PropertySaleTaxExemptionMetadata() {
7632
+ return _super !== null && _super.apply(this, arguments) || this;
7633
+ }
7634
+ return PropertySaleTaxExemptionMetadata;
7635
+ }(PropertySaleTaxExemptionMetadata$1));
7453
7636
 
7454
7637
  /**
7455
7638
  * Constant with list of URLs
@@ -10599,47 +10782,6 @@
10599
10782
  }]
10600
10783
  }] });
10601
10784
 
10602
- /**
10603
- * Service for get property equity position half-year history chart data
10604
- */
10605
- var EquityPositionChartService = /** @class */ (function () {
10606
- function EquityPositionChartService(http, environment) {
10607
- this.http = http;
10608
- this.environment = environment;
10609
- }
10610
- EquityPositionChartService.prototype.get = function () {
10611
- // @TODO refactor backend
10612
- return this.http.get(this.environment.apiV2 + "/properties/categories/equity")
10613
- .pipe(operators.map(function (response) {
10614
- return response.map(function (item) {
10615
- return classTransformer.plainToClass(ChartData, {
10616
- name: item.category.name,
10617
- data: item.equity.map(function (serie) {
10618
- return classTransformer.plainToClass(ChartSerie, {
10619
- label: serie.date,
10620
- value: serie.amount
10621
- });
10622
- })
10623
- });
10624
- });
10625
- }));
10626
- };
10627
- return EquityPositionChartService;
10628
- }());
10629
- EquityPositionChartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
10630
- EquityPositionChartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, providedIn: 'root' });
10631
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, decorators: [{
10632
- type: i0.Injectable,
10633
- args: [{
10634
- providedIn: 'root'
10635
- }]
10636
- }], ctorParameters: function () {
10637
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
10638
- type: i0.Inject,
10639
- args: ['environment']
10640
- }] }];
10641
- } });
10642
-
10643
10785
  /**
10644
10786
  * Service for work with Property
10645
10787
  */
@@ -10896,49 +11038,6 @@
10896
11038
  }]
10897
11039
  }] });
10898
11040
 
10899
- /**
10900
- * Service to work with capital costs
10901
- */
10902
- var PropertyCapitalCostService = /** @class */ (function (_super) {
10903
- __extends(PropertyCapitalCostService, _super);
10904
- function PropertyCapitalCostService() {
10905
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
10906
- _this.url = 'capital-costs';
10907
- _this.modelClass = PropertyCapitalCost;
10908
- return _this;
10909
- }
10910
- /**
10911
- * Get property capital costs
10912
- * @param property which params will be taken for list of property capital costs
10913
- */
10914
- PropertyCapitalCostService.prototype.getByProperty = function (property) {
10915
- // get list of capital costs items
10916
- return this.get()
10917
- .pipe(operators.map(function (capitalCosts) {
10918
- // property capital costs array
10919
- return capitalCosts.map(function (capitalCost) {
10920
- var _a;
10921
- // return new Property capital cost object with capital cost and amount
10922
- return classTransformer.plainToClass(PropertyCapitalCost, {
10923
- capitalCost: capitalCost,
10924
- amount: ((_a = property.capitalCosts.find(function (existingCapitalCost) {
10925
- return existingCapitalCost.capitalCost.id === capitalCost.id;
10926
- })) === null || _a === void 0 ? void 0 : _a.amount) || null
10927
- });
10928
- });
10929
- }));
10930
- };
10931
- return PropertyCapitalCostService;
10932
- }(BaseRestService));
10933
- PropertyCapitalCostService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCapitalCostService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
10934
- PropertyCapitalCostService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCapitalCostService, providedIn: 'root' });
10935
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCapitalCostService, decorators: [{
10936
- type: i0.Injectable,
10937
- args: [{
10938
- providedIn: 'root'
10939
- }]
10940
- }] });
10941
-
10942
11041
  /**
10943
11042
  * Service for work with Property Categories
10944
11043
  */
@@ -10961,52 +11060,6 @@
10961
11060
  }]
10962
11061
  }] });
10963
11062
 
10964
- var PropertyCategoryMovementService = /** @class */ (function (_super) {
10965
- __extends(PropertyCategoryMovementService, _super);
10966
- function PropertyCategoryMovementService() {
10967
- var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
10968
- _this.modelClass = PropertyCategoryMovement;
10969
- _this.url = 'properties/category-movements';
10970
- return _this;
10971
- }
10972
- PropertyCategoryMovementService.prototype.add = function (model) {
10973
- var _this = this;
10974
- return _super.prototype.add.call(this, model).pipe(operators.map(function (newMovement) {
10975
- // @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
10976
- _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
10977
- return newMovement;
10978
- }));
10979
- };
10980
- PropertyCategoryMovementService.prototype.update = function (model) {
10981
- var _this = this;
10982
- return _super.prototype.update.call(this, model).pipe(operators.map(function (updatedMovement) {
10983
- _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
10984
- return updatedMovement;
10985
- }));
10986
- };
10987
- PropertyCategoryMovementService.prototype.delete = function (model) {
10988
- var _this = this;
10989
- return _super.prototype.delete.call(this, model).pipe(operators.map(function () {
10990
- _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
10991
- }));
10992
- };
10993
- // @TODO Alex: Move to collection
10994
- PropertyCategoryMovementService.prototype.getByPropertyId = function (id) {
10995
- return this.get().pipe(operators.map(function (movements) {
10996
- return movements.filter(function (movement) { return movement.property.id === id; });
10997
- }));
10998
- };
10999
- return PropertyCategoryMovementService;
11000
- }(BaseRestService));
11001
- PropertyCategoryMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
11002
- PropertyCategoryMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, providedIn: 'root' });
11003
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, decorators: [{
11004
- type: i0.Injectable,
11005
- args: [{
11006
- providedIn: 'root'
11007
- }]
11008
- }] });
11009
-
11010
11063
  /**
11011
11064
  * Class for work with Property Documents
11012
11065
  */
@@ -11032,8 +11085,10 @@
11032
11085
  formDataDocument.append('file', file);
11033
11086
  return this.http.post(this.environment.apiV2 + "/properties/" + propertyId + "/documents", formDataDocument).pipe(operators.map(function (documentBase) {
11034
11087
  var newDocument = classTransformer.plainToClass(PropertyDocument, documentBase);
11035
- _this.cache.push(newDocument);
11036
- _this.updateCache();
11088
+ if (_this.cache) {
11089
+ _this.cache.push(newDocument);
11090
+ _this.updateCache();
11091
+ }
11037
11092
  return newDocument;
11038
11093
  }));
11039
11094
  };
@@ -11193,22 +11248,106 @@
11193
11248
  }] }];
11194
11249
  } });
11195
11250
 
11251
+ var PropertySaleService = /** @class */ (function (_super) {
11252
+ __extends(PropertySaleService, _super);
11253
+ function PropertySaleService() {
11254
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11255
+ _this.modelClass = PropertySale;
11256
+ _this.url = 'properties/sales';
11257
+ return _this;
11258
+ }
11259
+ return PropertySaleService;
11260
+ }(BaseRestService));
11261
+ PropertySaleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySaleService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
11262
+ PropertySaleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySaleService, providedIn: 'root' });
11263
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySaleService, decorators: [{
11264
+ type: i0.Injectable,
11265
+ args: [{
11266
+ providedIn: 'root'
11267
+ }]
11268
+ }] });
11269
+
11196
11270
  /**
11197
- * Service for work with Property Sold
11271
+ * Service for get property equity position half-year history chart data
11198
11272
  */
11199
- var PropertySoldService = /** @class */ (function (_super) {
11200
- __extends(PropertySoldService, _super);
11201
- function PropertySoldService() {
11273
+ var EquityPositionChartService = /** @class */ (function () {
11274
+ function EquityPositionChartService(http, environment) {
11275
+ this.http = http;
11276
+ this.environment = environment;
11277
+ }
11278
+ EquityPositionChartService.prototype.get = function () {
11279
+ // @TODO refactor backend
11280
+ return this.http.get(this.environment.apiV2 + "/properties/categories/equity")
11281
+ .pipe(operators.map(function (response) {
11282
+ return response.map(function (item) {
11283
+ return classTransformer.plainToClass(ChartData, {
11284
+ name: item.category.name,
11285
+ data: item.equity.map(function (serie) {
11286
+ return classTransformer.plainToClass(ChartSerie, {
11287
+ label: serie.date,
11288
+ value: serie.amount
11289
+ });
11290
+ })
11291
+ });
11292
+ });
11293
+ }));
11294
+ };
11295
+ return EquityPositionChartService;
11296
+ }());
11297
+ EquityPositionChartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, deps: [{ token: i1__namespace.HttpClient }, { token: 'environment' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
11298
+ EquityPositionChartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, providedIn: 'root' });
11299
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: EquityPositionChartService, decorators: [{
11300
+ type: i0.Injectable,
11301
+ args: [{
11302
+ providedIn: 'root'
11303
+ }]
11304
+ }], ctorParameters: function () {
11305
+ return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
11306
+ type: i0.Inject,
11307
+ args: ['environment']
11308
+ }] }];
11309
+ } });
11310
+
11311
+ var PropertyCategoryMovementService = /** @class */ (function (_super) {
11312
+ __extends(PropertyCategoryMovementService, _super);
11313
+ function PropertyCategoryMovementService() {
11202
11314
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11203
- _this.modelClass = PropertySold;
11204
- _this.url = 'properties/sold';
11315
+ _this.modelClass = PropertyCategoryMovement;
11316
+ _this.url = 'properties/category-movements';
11205
11317
  return _this;
11206
11318
  }
11207
- return PropertySoldService;
11319
+ PropertyCategoryMovementService.prototype.add = function (model) {
11320
+ var _this = this;
11321
+ return _super.prototype.add.call(this, model).pipe(operators.map(function (newMovement) {
11322
+ // @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
11323
+ _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
11324
+ return newMovement;
11325
+ }));
11326
+ };
11327
+ PropertyCategoryMovementService.prototype.update = function (model) {
11328
+ var _this = this;
11329
+ return _super.prototype.update.call(this, model).pipe(operators.map(function (updatedMovement) {
11330
+ _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
11331
+ return updatedMovement;
11332
+ }));
11333
+ };
11334
+ PropertyCategoryMovementService.prototype.delete = function (model) {
11335
+ var _this = this;
11336
+ return _super.prototype.delete.call(this, model).pipe(operators.map(function () {
11337
+ _this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
11338
+ }));
11339
+ };
11340
+ // @TODO Alex: Move to collection
11341
+ PropertyCategoryMovementService.prototype.getByPropertyId = function (id) {
11342
+ return this.get().pipe(operators.map(function (movements) {
11343
+ return movements.filter(function (movement) { return movement.property.id === id; });
11344
+ }));
11345
+ };
11346
+ return PropertyCategoryMovementService;
11208
11347
  }(BaseRestService));
11209
- PropertySoldService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySoldService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
11210
- PropertySoldService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySoldService, providedIn: 'root' });
11211
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertySoldService, decorators: [{
11348
+ PropertyCategoryMovementService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
11349
+ PropertyCategoryMovementService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, providedIn: 'root' });
11350
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PropertyCategoryMovementService, decorators: [{
11212
11351
  type: i0.Injectable,
11213
11352
  args: [{
11214
11353
  providedIn: 'root'
@@ -12548,6 +12687,26 @@
12548
12687
  }]
12549
12688
  }] });
12550
12689
 
12690
+ var TaxExemptionService = /** @class */ (function (_super) {
12691
+ __extends(TaxExemptionService, _super);
12692
+ function TaxExemptionService() {
12693
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
12694
+ _this.modelClass = TaxExemption;
12695
+ _this.url = 'tax-exemptions';
12696
+ _this.isHydra = true;
12697
+ return _this;
12698
+ }
12699
+ return TaxExemptionService;
12700
+ }(BaseRestService));
12701
+ TaxExemptionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TaxExemptionService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
12702
+ TaxExemptionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TaxExemptionService, providedIn: 'root' });
12703
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TaxExemptionService, decorators: [{
12704
+ type: i0.Injectable,
12705
+ args: [{
12706
+ providedIn: 'root'
12707
+ }]
12708
+ }] });
12709
+
12551
12710
  // deep clone for entity
12552
12711
  function cloneDeep(array) {
12553
12712
  return JSON.parse(JSON.stringify(array));
@@ -12750,8 +12909,6 @@
12750
12909
  exports.PreloaderService = PreloaderService;
12751
12910
  exports.Property = Property;
12752
12911
  exports.PropertyCalculationService = PropertyCalculationService;
12753
- exports.PropertyCapitalCost = PropertyCapitalCost;
12754
- exports.PropertyCapitalCostService = PropertyCapitalCostService;
12755
12912
  exports.PropertyCategory = PropertyCategory;
12756
12913
  exports.PropertyCategoryMovement = PropertyCategoryMovement;
12757
12914
  exports.PropertyCategoryMovementService = PropertyCategoryMovementService;
@@ -12764,9 +12921,10 @@
12764
12921
  exports.PropertyForecast = PropertyForecast;
12765
12922
  exports.PropertyOwner = PropertyOwner;
12766
12923
  exports.PropertyOwnerService = PropertyOwnerService;
12924
+ exports.PropertySale = PropertySale;
12925
+ exports.PropertySaleService = PropertySaleService;
12926
+ exports.PropertySaleTaxExemptionMetadata = PropertySaleTaxExemptionMetadata;
12767
12927
  exports.PropertyService = PropertyService;
12768
- exports.PropertySold = PropertySold;
12769
- exports.PropertySoldService = PropertySoldService;
12770
12928
  exports.PropertySubscription = PropertySubscription;
12771
12929
  exports.PropertyValuation = PropertyValuation;
12772
12930
  exports.RegistrationInvite = RegistrationInvite;
@@ -12786,6 +12944,9 @@
12786
12944
  exports.SseService = SseService;
12787
12945
  exports.SubscriptionService = SubscriptionService;
12788
12946
  exports.TYPE_LOAN = TYPE_LOAN;
12947
+ exports.TaxExemption = TaxExemption;
12948
+ exports.TaxExemptionMetadata = TaxExemptionMetadata;
12949
+ exports.TaxExemptionService = TaxExemptionService;
12789
12950
  exports.TaxReturnCategoryItem = TaxReturnCategoryItem;
12790
12951
  exports.TaxReturnCategoryItemCollection = TaxReturnCategoryItemCollection;
12791
12952
  exports.TaxReturnCategoryItemDetails = TaxReturnCategoryItemDetails;