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.
- package/bundles/taxtank-core.umd.js +338 -177
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/depreciation.collection.js +13 -2
- package/esm2015/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.js +20 -0
- package/esm2015/lib/collections/property/property.collection.js +72 -0
- package/esm2015/lib/db/Enums/property/property-category-list.enum.js +5 -0
- package/esm2015/lib/db/Enums/{property-depreciation-calculation.enum.js → property/property-depreciation-calculation.enum.js} +1 -1
- package/esm2015/lib/db/Enums/property/property-owner-access.enum.js +6 -0
- package/esm2015/lib/db/Enums/property/property-owner-status.enum.js +7 -0
- package/esm2015/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.js +9 -0
- package/esm2015/lib/db/Enums/property/property-sale/tax-exemption.enum.js +12 -0
- package/esm2015/lib/db/Models/bank-account-property.js +1 -1
- package/esm2015/lib/db/Models/depreciation-capital-project.js +1 -1
- package/esm2015/lib/db/Models/depreciation.js +1 -1
- package/esm2015/lib/db/Models/property/property-category-movement.js +3 -0
- package/esm2015/lib/db/Models/property/property-category.js +3 -0
- package/esm2015/lib/db/Models/property/property-document.js +3 -0
- package/esm2015/lib/db/Models/property/property-forecast.js +3 -0
- package/esm2015/lib/db/Models/property/property-owner.js +3 -0
- package/esm2015/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.js +3 -0
- package/esm2015/lib/db/Models/property/property-sale/property-sale.js +3 -0
- package/esm2015/lib/db/Models/property/property-sale/tax-exemption-metadata.js +3 -0
- package/esm2015/lib/db/Models/property/property-sale/tax-exemption.js +3 -0
- package/esm2015/lib/db/Models/property/property-subscription.js +3 -0
- package/esm2015/lib/db/Models/property/property-valuation.js +3 -0
- package/esm2015/lib/db/Models/property/property.js +3 -0
- package/esm2015/lib/db/Models/transaction-base.js +1 -1
- package/esm2015/lib/db/Models/transaction.js +1 -1
- package/esm2015/lib/db/Models/user.js +1 -1
- package/esm2015/lib/interceptors/corelogic-interceptor.js +2 -2
- package/esm2015/lib/models/depreciation/depreciation.js +5 -1
- package/esm2015/lib/models/endpoint/endpoints.const.js +1 -2
- package/esm2015/lib/models/property/property-category-movement.js +2 -2
- package/esm2015/lib/models/property/property-category.js +2 -2
- package/esm2015/lib/models/property/property-document.js +2 -2
- package/esm2015/lib/models/property/property-equity-chart-data.js +3 -3
- package/esm2015/lib/models/property/property-forecast.js +2 -2
- package/esm2015/lib/models/property/property-owner.js +3 -3
- package/esm2015/lib/models/property/property-sale/property-sale-tax-exemption-metadata.js +4 -0
- package/esm2015/lib/models/property/property-sale/property-sale.js +19 -0
- package/esm2015/lib/models/property/property-sale/tax-exemption-metadata.js +4 -0
- package/esm2015/lib/models/property/property-sale/tax-exemption.js +4 -0
- package/esm2015/lib/models/property/property-subscription.js +2 -2
- package/esm2015/lib/models/property/property-valuation.js +2 -2
- package/esm2015/lib/models/property/property.js +87 -4
- package/esm2015/lib/services/depreciation/depreciation.service.js +1 -1
- package/esm2015/lib/services/property/corelogic/corelogic.service.js +46 -0
- package/esm2015/lib/services/property/property-calculation/property-calculation.service.js +121 -0
- package/esm2015/lib/services/property/property-category/property-category.service.js +23 -0
- package/esm2015/lib/services/property/property-category-movement.service.js +1 -1
- package/esm2015/lib/services/property/property-document/property-document.service.js +70 -0
- package/esm2015/lib/services/property/{property-owner.service.js → property-owner/property-owner.service.js} +7 -7
- package/esm2015/lib/services/property/property-sale/property-sale.service.js +20 -0
- package/esm2015/lib/services/property/property-sale/tax-exemption/tax-exemption.service.js +21 -0
- package/esm2015/lib/services/property/property.service.js +1 -1
- package/esm2015/public-api.js +18 -14
- package/fesm2015/taxtank-core.js +277 -146
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/collections/depreciation.collection.d.ts +4 -1
- package/lib/collections/property/property-sale/property-sale-tax-exemption-metadata.collection.d.ts +8 -0
- package/lib/collections/{property.collection.d.ts → property/property.collection.d.ts} +4 -4
- package/lib/db/Enums/property/property-category-list.enum.d.ts +3 -0
- package/lib/db/Enums/{property-depreciation-calculation.enum.d.ts → property/property-depreciation-calculation.enum.d.ts} +0 -0
- package/lib/db/Enums/{property-owner-access.enum.d.ts → property/property-owner-access.enum.d.ts} +0 -0
- package/lib/db/Enums/{property-owner-status.enum.d.ts → property/property-owner-status.enum.d.ts} +0 -0
- package/lib/db/Enums/property/property-sale/tax-exemption-metadata.enum.d.ts +5 -0
- package/lib/db/Enums/property/property-sale/tax-exemption.enum.d.ts +9 -0
- package/lib/db/Models/bank-account-property.d.ts +1 -1
- package/lib/db/Models/depreciation-capital-project.d.ts +1 -1
- package/lib/db/Models/depreciation.d.ts +1 -1
- package/lib/db/Models/{property-category-movement.d.ts → property/property-category-movement.d.ts} +1 -1
- package/lib/db/Models/{property-category.d.ts → property/property-category.d.ts} +1 -1
- package/lib/db/Models/{property-document.d.ts → property/property-document.d.ts} +1 -1
- package/lib/db/Models/{property-forecast.d.ts → property/property-forecast.d.ts} +0 -0
- package/lib/db/Models/{property-owner.d.ts → property/property-owner.d.ts} +4 -4
- package/lib/db/Models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +8 -0
- package/lib/db/Models/property/property-sale/property-sale.d.ts +20 -0
- package/lib/db/Models/property/property-sale/tax-exemption-metadata.d.ts +6 -0
- package/lib/db/Models/property/property-sale/tax-exemption.d.ts +6 -0
- package/lib/db/Models/{property-subscription.d.ts → property/property-subscription.d.ts} +1 -1
- package/lib/db/Models/{property-valuation.d.ts → property/property-valuation.d.ts} +0 -0
- package/lib/db/Models/{property.d.ts → property/property.d.ts} +9 -8
- package/lib/db/Models/transaction-base.d.ts +1 -1
- package/lib/db/Models/transaction.d.ts +1 -1
- package/lib/db/Models/user.d.ts +3 -3
- package/lib/interceptors/corelogic-interceptor.d.ts +1 -1
- package/lib/models/depreciation/depreciation.d.ts +1 -0
- package/lib/models/property/property-category-movement.d.ts +1 -1
- package/lib/models/property/property-category.d.ts +1 -1
- package/lib/models/property/property-document.d.ts +1 -1
- package/lib/models/property/property-equity-chart-data.d.ts +1 -1
- package/lib/models/property/property-forecast.d.ts +1 -1
- package/lib/models/property/property-owner.d.ts +1 -1
- package/lib/models/property/property-sale/property-sale-tax-exemption-metadata.d.ts +3 -0
- package/lib/models/property/property-sale/property-sale.d.ts +8 -0
- package/lib/models/property/property-sale/tax-exemption-metadata.d.ts +3 -0
- package/lib/models/property/property-sale/tax-exemption.d.ts +3 -0
- package/lib/models/property/property-subscription.d.ts +1 -1
- package/lib/models/property/property-valuation.d.ts +1 -1
- package/lib/models/property/property.d.ts +34 -3
- package/lib/services/property/{corelogic.service.d.ts → corelogic/corelogic.service.d.ts} +1 -1
- package/lib/services/property/{property-calculation.service.d.ts → property-calculation/property-calculation.service.d.ts} +5 -5
- package/lib/services/property/{property-category.service.d.ts → property-category/property-category.service.d.ts} +3 -3
- package/lib/services/property/property-category-movement.service.d.ts +1 -1
- package/lib/services/property/{property-document.service.d.ts → property-document/property-document.service.d.ts} +4 -4
- package/lib/services/property/{property-owner.service.d.ts → property-owner/property-owner.service.d.ts} +4 -4
- package/lib/services/property/property-sale/property-sale.service.d.ts +10 -0
- package/lib/services/property/property-sale/tax-exemption/tax-exemption.service.d.ts +11 -0
- package/lib/services/property/property.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +17 -13
- package/esm2015/lib/collections/property.collection.js +0 -72
- package/esm2015/lib/db/Enums/property-owner-access.enum.js +0 -6
- package/esm2015/lib/db/Enums/property-owner-status.enum.js +0 -7
- package/esm2015/lib/db/Models/capital-cost-property.js +0 -3
- package/esm2015/lib/db/Models/capital-cost.js +0 -3
- package/esm2015/lib/db/Models/property-capital-cost.js +0 -3
- package/esm2015/lib/db/Models/property-category-movement.js +0 -3
- package/esm2015/lib/db/Models/property-category.js +0 -3
- package/esm2015/lib/db/Models/property-document.js +0 -3
- package/esm2015/lib/db/Models/property-forecast.js +0 -3
- package/esm2015/lib/db/Models/property-owner.js +0 -3
- package/esm2015/lib/db/Models/property-sold.js +0 -3
- package/esm2015/lib/db/Models/property-subscription.js +0 -3
- package/esm2015/lib/db/Models/property-valuation.js +0 -3
- package/esm2015/lib/db/Models/property.js +0 -3
- package/esm2015/lib/models/property/property-capital-cost.js +0 -4
- package/esm2015/lib/models/property/property-sold.js +0 -12
- package/esm2015/lib/services/property/corelogic.service.js +0 -46
- package/esm2015/lib/services/property/property-calculation.service.js +0 -121
- package/esm2015/lib/services/property/property-capital-cost.service.js +0 -46
- package/esm2015/lib/services/property/property-category.service.js +0 -23
- package/esm2015/lib/services/property/property-document.service.js +0 -68
- package/esm2015/lib/services/property/property-sold.service.js +0 -23
- package/lib/db/Models/capital-cost-property.d.ts +0 -13
- package/lib/db/Models/capital-cost.d.ts +0 -4
- package/lib/db/Models/property-capital-cost.d.ts +0 -13
- package/lib/db/Models/property-sold.d.ts +0 -12
- package/lib/models/property/property-capital-cost.d.ts +0 -3
- package/lib/models/property/property-sold.d.ts +0 -5
- package/lib/services/property/property-capital-cost.service.d.ts +0 -20
- package/lib/services/property/property-sold.service.d.ts +0 -13
package/fesm2015/taxtank-core.js
CHANGED
|
@@ -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
|
|
1773
|
+
get earliestContractDate() {
|
|
1764
1774
|
return this.items.reduce((min, property) => {
|
|
1765
|
-
return min < property.
|
|
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.
|
|
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,86 @@ 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
|
+
console.log(sale.price, sale.saleCostsTotalAmount, sale.capitalLoss, this.calculateCostBase(sale));
|
|
3608
|
+
return sale.price - sale.saleCostsTotalAmount - sale.capitalLoss - this.calculateCostBase(sale);
|
|
3609
|
+
}
|
|
3610
|
+
/**
|
|
3611
|
+
* net capital gain tax (includes tax exemptions)
|
|
3612
|
+
*/
|
|
3613
|
+
calculateNetCGT(sale) {
|
|
3614
|
+
return this.getCGTExemptionRatio(sale) * this.calculateCGT(sale);
|
|
3615
|
+
}
|
|
3616
|
+
/**
|
|
3617
|
+
* guess tax exemption based on property details
|
|
3618
|
+
*/
|
|
3619
|
+
getCGTExemption(sale) {
|
|
3620
|
+
if (sale.taxExemption) {
|
|
3621
|
+
return sale.taxExemption.id;
|
|
3622
|
+
}
|
|
3623
|
+
switch (true) {
|
|
3624
|
+
// exemption for main residence properties
|
|
3625
|
+
case this.category.id === PropertyCategoryListEnum.OWNER_OCCUPIED:
|
|
3626
|
+
return TaxExemptionEnum.PPR;
|
|
3627
|
+
// exemption for investment properties owned for at least one year
|
|
3628
|
+
case this.getOwnershipDuration(sale, 'years') >= 1:
|
|
3629
|
+
return TaxExemptionEnum.ONE_YEAR_RULE;
|
|
3630
|
+
default:
|
|
3631
|
+
return null;
|
|
3632
|
+
}
|
|
3633
|
+
}
|
|
3634
|
+
/**
|
|
3635
|
+
* tax exemption can reduce cgt from 100% to less (up to zero)
|
|
3636
|
+
*/
|
|
3637
|
+
getCGTExemptionRatio(sale) {
|
|
3638
|
+
var _a;
|
|
3639
|
+
const metadata = new PropertySaleTaxExemptionMetadataCollection(sale.taxExemptionMetadata);
|
|
3640
|
+
switch ((_a = sale.taxExemption) === null || _a === void 0 ? void 0 : _a.id) {
|
|
3641
|
+
// 50% exemption for investments owned for at least one year
|
|
3642
|
+
case TaxExemptionEnum.ONE_YEAR_RULE:
|
|
3643
|
+
return 0.5;
|
|
3644
|
+
// investment property become main residence (exemption for main residence ownership duration)
|
|
3645
|
+
case TaxExemptionEnum.INVESTMENT_TO_PPR:
|
|
3646
|
+
const ownershipDays = this.getOwnershipDuration(sale);
|
|
3647
|
+
return (ownershipDays - metadata.getPPRDays()) / ownershipDays;
|
|
3648
|
+
// main residence become investment (exemption for home office percent usage)
|
|
3649
|
+
case TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
3650
|
+
return metadata.getClaimPercent() / 100;
|
|
3651
|
+
// full exemption
|
|
3652
|
+
case TaxExemptionEnum.PPR:
|
|
3653
|
+
case TaxExemptionEnum.SIX_YEARS_RULE:
|
|
3654
|
+
case TaxExemptionEnum.TRANSFER:
|
|
3655
|
+
case TaxExemptionEnum.OTHER:
|
|
3656
|
+
return 0;
|
|
3657
|
+
// no exemption
|
|
3658
|
+
default:
|
|
3659
|
+
return 1;
|
|
3660
|
+
}
|
|
3661
|
+
}
|
|
3662
|
+
/**
|
|
3663
|
+
* ownership duration from purchase till sale
|
|
3664
|
+
*/
|
|
3665
|
+
getOwnershipDuration(sale, unitOfTime = 'days') {
|
|
3666
|
+
return moment(sale.contractDate).diff(moment(this.contractDate), unitOfTime);
|
|
3667
|
+
}
|
|
3535
3668
|
}
|
|
3536
3669
|
__decorate([
|
|
3537
3670
|
Type(() => Date)
|
|
3538
|
-
], Property.prototype, "
|
|
3671
|
+
], Property.prototype, "contractDate", void 0);
|
|
3539
3672
|
__decorate([
|
|
3540
3673
|
Type(() => Date)
|
|
3541
3674
|
], Property.prototype, "settlementDate", void 0);
|
|
@@ -4207,6 +4340,10 @@ class Depreciation extends Depreciation$1 {
|
|
|
4207
4340
|
var _a;
|
|
4208
4341
|
return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.claimAmount) || 0;
|
|
4209
4342
|
}
|
|
4343
|
+
getCloseBalanceByYear(year) {
|
|
4344
|
+
var _a;
|
|
4345
|
+
return ((_a = this.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
|
|
4346
|
+
}
|
|
4210
4347
|
get assetValue() {
|
|
4211
4348
|
var _a;
|
|
4212
4349
|
return ((_a = this.currentYearForecast) === null || _a === void 0 ? void 0 : _a.closeBalance) || 0;
|
|
@@ -5574,12 +5711,6 @@ var OwnershipFilterOptionsEnum;
|
|
|
5574
5711
|
OwnershipFilterOptionsEnum[OwnershipFilterOptionsEnum["SHARED_PROPERTIES"] = 3] = "SHARED_PROPERTIES";
|
|
5575
5712
|
})(OwnershipFilterOptionsEnum || (OwnershipFilterOptionsEnum = {}));
|
|
5576
5713
|
|
|
5577
|
-
class PropertyCapitalCost$1 {
|
|
5578
|
-
}
|
|
5579
|
-
|
|
5580
|
-
class PropertyCapitalCost extends PropertyCapitalCost$1 {
|
|
5581
|
-
}
|
|
5582
|
-
|
|
5583
5714
|
/**
|
|
5584
5715
|
* class contains equity information for passed financial year
|
|
5585
5716
|
*/
|
|
@@ -5737,14 +5868,14 @@ class PropertyEquityChartData {
|
|
|
5737
5868
|
}, 0);
|
|
5738
5869
|
}
|
|
5739
5870
|
getMarketValueForPropertyByYear(property, year) {
|
|
5740
|
-
if (new FinancialYear(property.
|
|
5871
|
+
if (new FinancialYear(property.contractDate).year > year) {
|
|
5741
5872
|
return 0;
|
|
5742
5873
|
}
|
|
5743
5874
|
return (property.getForecastByYear(year) || first(property.forecasts)).marketValue;
|
|
5744
5875
|
}
|
|
5745
5876
|
getLoanBalanceForPropertyByYear(property, year) {
|
|
5746
5877
|
var _a;
|
|
5747
|
-
if (new FinancialYear(property.
|
|
5878
|
+
if (new FinancialYear(property.contractDate).year > year) {
|
|
5748
5879
|
return 0;
|
|
5749
5880
|
}
|
|
5750
5881
|
return ((_a = property.getForecastByYear(year)) === null || _a === void 0 ? void 0 : _a.loanBalance) || this.bankAccounts.getPropertyBalanceAmount(property.id);
|
|
@@ -5805,17 +5936,41 @@ __decorate([
|
|
|
5805
5936
|
Transform(({ obj }) => obj.user ? obj.user.email : obj.invite.email)
|
|
5806
5937
|
], PropertyOwner.prototype, "email", void 0);
|
|
5807
5938
|
|
|
5808
|
-
class
|
|
5939
|
+
class PropertySale$1 {
|
|
5809
5940
|
}
|
|
5810
5941
|
|
|
5811
|
-
class
|
|
5942
|
+
class PropertySaleTaxExemptionMetadata$1 {
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
class PropertySale extends PropertySale$1 {
|
|
5946
|
+
get saleCostsTotalAmount() {
|
|
5947
|
+
return this.commission + this.legalFees + this.otherCost;
|
|
5948
|
+
}
|
|
5812
5949
|
}
|
|
5813
5950
|
__decorate([
|
|
5814
5951
|
Type(() => Date)
|
|
5815
|
-
],
|
|
5952
|
+
], PropertySale.prototype, "settlementDate", void 0);
|
|
5816
5953
|
__decorate([
|
|
5817
5954
|
Type(() => Date)
|
|
5818
|
-
],
|
|
5955
|
+
], PropertySale.prototype, "contractDate", void 0);
|
|
5956
|
+
__decorate([
|
|
5957
|
+
Type(() => PropertySaleTaxExemptionMetadata$1)
|
|
5958
|
+
], PropertySale.prototype, "taxExemptionMetadata", void 0);
|
|
5959
|
+
|
|
5960
|
+
class TaxExemption$1 {
|
|
5961
|
+
}
|
|
5962
|
+
|
|
5963
|
+
class TaxExemption extends TaxExemption$1 {
|
|
5964
|
+
}
|
|
5965
|
+
|
|
5966
|
+
class TaxExemptionMetadata$1 {
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5969
|
+
class TaxExemptionMetadata extends TaxExemptionMetadata$1 {
|
|
5970
|
+
}
|
|
5971
|
+
|
|
5972
|
+
class PropertySaleTaxExemptionMetadata extends PropertySaleTaxExemptionMetadata$1 {
|
|
5973
|
+
}
|
|
5819
5974
|
|
|
5820
5975
|
/**
|
|
5821
5976
|
* Constant with list of URLs
|
|
@@ -8641,44 +8796,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8641
8796
|
}]
|
|
8642
8797
|
}] });
|
|
8643
8798
|
|
|
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
8799
|
/**
|
|
8683
8800
|
* Service for work with Property
|
|
8684
8801
|
*/
|
|
@@ -8910,46 +9027,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8910
9027
|
}]
|
|
8911
9028
|
}] });
|
|
8912
9029
|
|
|
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
9030
|
/**
|
|
8954
9031
|
* Service for work with Property Categories
|
|
8955
9032
|
*/
|
|
@@ -8969,46 +9046,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
8969
9046
|
}]
|
|
8970
9047
|
}] });
|
|
8971
9048
|
|
|
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
9049
|
/**
|
|
9013
9050
|
* Class for work with Property Documents
|
|
9014
9051
|
*/
|
|
@@ -9031,8 +9068,10 @@ class PropertyDocumentService extends BaseRestService {
|
|
|
9031
9068
|
formDataDocument.append('file', file);
|
|
9032
9069
|
return this.http.post(`${this.environment.apiV2}/properties/${propertyId}/documents`, formDataDocument).pipe(map((documentBase) => {
|
|
9033
9070
|
const newDocument = plainToClass(PropertyDocument, documentBase);
|
|
9034
|
-
this.cache
|
|
9035
|
-
|
|
9071
|
+
if (this.cache) {
|
|
9072
|
+
this.cache.push(newDocument);
|
|
9073
|
+
this.updateCache();
|
|
9074
|
+
}
|
|
9036
9075
|
return newDocument;
|
|
9037
9076
|
}));
|
|
9038
9077
|
}
|
|
@@ -9180,19 +9219,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
9180
9219
|
args: ['environment']
|
|
9181
9220
|
}] }]; } });
|
|
9182
9221
|
|
|
9222
|
+
class PropertySaleService extends BaseRestService {
|
|
9223
|
+
constructor() {
|
|
9224
|
+
super(...arguments);
|
|
9225
|
+
this.modelClass = PropertySale;
|
|
9226
|
+
this.url = 'properties/sales';
|
|
9227
|
+
}
|
|
9228
|
+
}
|
|
9229
|
+
PropertySaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
9230
|
+
PropertySaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, providedIn: 'root' });
|
|
9231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertySaleService, decorators: [{
|
|
9232
|
+
type: Injectable,
|
|
9233
|
+
args: [{
|
|
9234
|
+
providedIn: 'root'
|
|
9235
|
+
}]
|
|
9236
|
+
}] });
|
|
9237
|
+
|
|
9183
9238
|
/**
|
|
9184
|
-
* Service for
|
|
9239
|
+
* Service for get property equity position half-year history chart data
|
|
9185
9240
|
*/
|
|
9186
|
-
class
|
|
9241
|
+
class EquityPositionChartService {
|
|
9242
|
+
constructor(http, environment) {
|
|
9243
|
+
this.http = http;
|
|
9244
|
+
this.environment = environment;
|
|
9245
|
+
}
|
|
9246
|
+
get() {
|
|
9247
|
+
// @TODO refactor backend
|
|
9248
|
+
return this.http.get(`${this.environment.apiV2}/properties/categories/equity`)
|
|
9249
|
+
.pipe(map((response) => {
|
|
9250
|
+
return response.map((item) => {
|
|
9251
|
+
return plainToClass(ChartData, {
|
|
9252
|
+
name: item.category.name,
|
|
9253
|
+
data: item.equity.map((serie) => {
|
|
9254
|
+
return plainToClass(ChartSerie, {
|
|
9255
|
+
label: serie.date,
|
|
9256
|
+
value: serie.amount
|
|
9257
|
+
});
|
|
9258
|
+
})
|
|
9259
|
+
});
|
|
9260
|
+
});
|
|
9261
|
+
}));
|
|
9262
|
+
}
|
|
9263
|
+
}
|
|
9264
|
+
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 });
|
|
9265
|
+
EquityPositionChartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, providedIn: 'root' });
|
|
9266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: EquityPositionChartService, decorators: [{
|
|
9267
|
+
type: Injectable,
|
|
9268
|
+
args: [{
|
|
9269
|
+
providedIn: 'root'
|
|
9270
|
+
}]
|
|
9271
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
9272
|
+
type: Inject,
|
|
9273
|
+
args: ['environment']
|
|
9274
|
+
}] }]; } });
|
|
9275
|
+
|
|
9276
|
+
class PropertyCategoryMovementService extends BaseRestService {
|
|
9187
9277
|
constructor() {
|
|
9188
9278
|
super(...arguments);
|
|
9189
|
-
this.modelClass =
|
|
9190
|
-
this.url = 'properties/
|
|
9279
|
+
this.modelClass = PropertyCategoryMovement;
|
|
9280
|
+
this.url = 'properties/category-movements';
|
|
9281
|
+
}
|
|
9282
|
+
add(model) {
|
|
9283
|
+
return super.add(model).pipe(map((newMovement) => {
|
|
9284
|
+
// @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
|
|
9285
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
|
|
9286
|
+
return newMovement;
|
|
9287
|
+
}));
|
|
9288
|
+
}
|
|
9289
|
+
update(model) {
|
|
9290
|
+
return super.update(model).pipe(map((updatedMovement) => {
|
|
9291
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
|
|
9292
|
+
return updatedMovement;
|
|
9293
|
+
}));
|
|
9294
|
+
}
|
|
9295
|
+
delete(model) {
|
|
9296
|
+
return super.delete(model).pipe(map(() => {
|
|
9297
|
+
this.eventDispatcherService.dispatch(new AppEvent(AppEventTypeEnum.PROPERTY_MOVEMENT_CREATED, null));
|
|
9298
|
+
}));
|
|
9299
|
+
}
|
|
9300
|
+
// @TODO Alex: Move to collection
|
|
9301
|
+
getByPropertyId(id) {
|
|
9302
|
+
return this.get().pipe(map((movements) => {
|
|
9303
|
+
return movements.filter((movement) => movement.property.id === id);
|
|
9304
|
+
}));
|
|
9191
9305
|
}
|
|
9192
9306
|
}
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type:
|
|
9307
|
+
PropertyCategoryMovementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
9308
|
+
PropertyCategoryMovementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, providedIn: 'root' });
|
|
9309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PropertyCategoryMovementService, decorators: [{
|
|
9196
9310
|
type: Injectable,
|
|
9197
9311
|
args: [{
|
|
9198
9312
|
providedIn: 'root'
|
|
@@ -10429,6 +10543,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
|
10429
10543
|
}]
|
|
10430
10544
|
}] });
|
|
10431
10545
|
|
|
10546
|
+
class TaxExemptionService extends BaseRestService {
|
|
10547
|
+
constructor() {
|
|
10548
|
+
super(...arguments);
|
|
10549
|
+
this.modelClass = TaxExemption;
|
|
10550
|
+
this.url = 'tax-exemptions';
|
|
10551
|
+
this.isHydra = true;
|
|
10552
|
+
}
|
|
10553
|
+
}
|
|
10554
|
+
TaxExemptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
10555
|
+
TaxExemptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, providedIn: 'root' });
|
|
10556
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TaxExemptionService, decorators: [{
|
|
10557
|
+
type: Injectable,
|
|
10558
|
+
args: [{
|
|
10559
|
+
providedIn: 'root'
|
|
10560
|
+
}]
|
|
10561
|
+
}] });
|
|
10562
|
+
|
|
10432
10563
|
// deep clone for entity
|
|
10433
10564
|
function cloneDeep(array) {
|
|
10434
10565
|
return JSON.parse(JSON.stringify(array));
|
|
@@ -10507,5 +10638,5 @@ function taxReviewFilterPredicate(data, filter) {
|
|
|
10507
10638
|
* Generated bundle index. Do not edit.
|
|
10508
10639
|
*/
|
|
10509
10640
|
|
|
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,
|
|
10641
|
+
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, PropertyCategory, PropertyCategoryMovement, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyForecast, PropertyOwner, PropertyOwnerAccessEnum, PropertyOwnerService, PropertyOwnerStatusEnum, PropertySale, PropertySaleService, PropertySaleTaxExemptionMetadata, PropertyService, 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, 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
10642
|
//# sourceMappingURL=taxtank-core.js.map
|