taxtank-core 0.30.29 → 0.30.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/collections/holding.collection.mjs +28 -0
- package/esm2020/lib/collections/index.mjs +2 -1
- package/esm2020/lib/collections/property/property-sale/property-sale.collection.mjs +3 -3
- package/esm2020/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
- package/esm2020/lib/db/Enums/index.mjs +2 -1
- package/esm2020/lib/db/Models/client/annual-client-details.mjs +3 -0
- package/esm2020/lib/db/Models/client/client-details.mjs +4 -0
- package/esm2020/lib/db/Models/client/client-income-types.mjs +4 -0
- package/esm2020/lib/db/Models/client/index.mjs +5 -0
- package/esm2020/lib/db/Models/client/occupation.mjs +4 -0
- package/esm2020/lib/db/Models/index.mjs +2 -4
- package/esm2020/lib/db/Models/property/property-sale/property-sale.mjs +1 -1
- package/esm2020/lib/db/Models/user/user.mjs +1 -1
- package/esm2020/lib/forms/client/annual-client-details.form.mjs +37 -0
- package/esm2020/lib/forms/client/index.mjs +3 -0
- package/esm2020/lib/forms/holding/holding-sale.form.mjs +39 -0
- package/esm2020/lib/forms/holding/holding-type.form.mjs +16 -0
- package/esm2020/lib/forms/holding/holding.form.mjs +17 -0
- package/esm2020/lib/forms/holding/index.mjs +4 -0
- package/esm2020/lib/forms/index.mjs +3 -2
- package/esm2020/lib/forms/property/property-sale/property-sale-cost-sale.form.mjs +11 -25
- package/esm2020/lib/forms/property/property-sale/property-sale-exemptions.form.mjs +18 -7
- package/esm2020/lib/forms/report/my-tax/my-tax-cgt.form.mjs +4 -1
- package/esm2020/lib/messages/index.mjs +2 -0
- package/esm2020/lib/messages/messages.enum.mjs +16 -0
- package/esm2020/lib/models/client/annual-client-details.mjs +15 -0
- package/esm2020/lib/models/client/client-details.mjs +2 -2
- package/esm2020/lib/models/client/client-income-types.mjs +2 -2
- package/esm2020/lib/models/client/index.mjs +8 -0
- package/esm2020/lib/models/endpoint/endpoints.const.mjs +17 -1
- package/esm2020/lib/models/holding/holding-sale.mjs +18 -1
- package/esm2020/lib/models/holding/holding-type-exchange.mjs +13 -0
- package/esm2020/lib/models/holding/holding-type.mjs +37 -1
- package/esm2020/lib/models/holding/holding.mjs +32 -1
- package/esm2020/lib/models/index.mjs +2 -1
- package/esm2020/lib/models/property/property-sale/property-sale.mjs +19 -6
- package/esm2020/lib/models/property/property-sale/tax-exemption.mjs +5 -1
- package/esm2020/lib/models/property/property.mjs +38 -18
- package/esm2020/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.mjs +7 -6
- package/esm2020/lib/models/user/occupation.mjs +2 -2
- package/esm2020/lib/services/http/client/capital-gain/annual-client-details.service.mjs +24 -0
- package/esm2020/lib/services/http/client/index.mjs +3 -0
- package/esm2020/lib/services/http/client/occupation/occupation.service.mjs +45 -0
- package/esm2020/lib/services/http/firm/client-income/client-income-types.service.mjs +1 -1
- package/esm2020/lib/services/http/holding/holding-messages.enum.mjs +7 -0
- package/esm2020/lib/services/http/holding/holding-sale-messages.enum.mjs +7 -0
- package/esm2020/lib/services/http/holding/holding-sale.service.mjs +1 -4
- package/esm2020/lib/services/http/holding/holding-type-messages.enum.mjs +7 -0
- package/esm2020/lib/services/http/holding/holding-type.service.mjs +1 -4
- package/esm2020/lib/services/http/holding/holding.service.mjs +3 -6
- package/esm2020/lib/services/http/holding/index.mjs +4 -1
- package/esm2020/lib/services/http/index.mjs +2 -1
- package/esm2020/lib/services/http/user/index.mjs +2 -2
- package/esm2020/lib/services/http/user/user.service.mjs +2 -11
- package/esm2020/public-api.mjs +5 -1
- package/fesm2015/taxtank-core.mjs +580 -254
- package/fesm2015/taxtank-core.mjs.map +1 -1
- package/fesm2020/taxtank-core.mjs +577 -252
- package/fesm2020/taxtank-core.mjs.map +1 -1
- package/lib/collections/holding.collection.d.ts +10 -0
- package/lib/collections/index.d.ts +1 -0
- package/lib/collections/property/property-sale/property-sale.collection.d.ts +1 -1
- package/lib/db/Enums/index.d.ts +1 -0
- package/lib/db/Models/client/annual-client-details.d.ts +12 -0
- package/lib/db/Models/{user → client}/client-details.d.ts +1 -2
- package/lib/db/Models/client/index.d.ts +4 -0
- package/lib/db/Models/index.d.ts +1 -3
- package/lib/db/Models/property/property-sale/property-sale.d.ts +2 -3
- package/lib/db/Models/user/user.d.ts +1 -1
- package/lib/forms/client/annual-client-details.form.d.ts +8 -0
- package/lib/forms/client/index.d.ts +2 -0
- package/lib/forms/holding/holding-sale.form.d.ts +11 -0
- package/lib/forms/holding/holding-type.form.d.ts +5 -0
- package/lib/forms/holding/holding.form.d.ts +5 -0
- package/lib/forms/holding/index.d.ts +3 -0
- package/lib/forms/index.d.ts +2 -1
- package/lib/forms/property/property-sale/property-sale-cost-sale.form.d.ts +1 -3
- package/lib/forms/property/property-sale/property-sale-exemptions.form.d.ts +6 -6
- package/lib/forms/report/my-tax/my-tax-cgt.form.d.ts +4 -1
- package/lib/messages/index.d.ts +1 -0
- package/lib/messages/messages.enum.d.ts +14 -0
- package/lib/models/client/annual-client-details.d.ts +12 -0
- package/lib/models/client/client-details.d.ts +1 -1
- package/lib/models/client/client-income-types.d.ts +1 -1
- package/lib/models/client/index.d.ts +7 -0
- package/lib/models/holding/holding-sale.d.ts +6 -1
- package/lib/models/holding/holding-type-exchange.d.ts +11 -0
- package/lib/models/holding/holding-type.d.ts +31 -8
- package/lib/models/holding/holding.d.ts +16 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/property/property-sale/property-sale.d.ts +7 -2
- package/lib/models/property/property-sale/tax-exemption.d.ts +1 -0
- package/lib/models/property/property.d.ts +12 -6
- package/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.d.ts +2 -2
- package/lib/models/user/occupation.d.ts +1 -1
- package/lib/services/http/client/capital-gain/annual-client-details.service.d.ts +14 -0
- package/lib/services/http/client/index.d.ts +2 -0
- package/lib/services/http/firm/client-income/client-income-types.service.d.ts +1 -1
- package/lib/services/http/holding/holding-messages.enum.d.ts +5 -0
- package/lib/services/http/holding/holding-sale-messages.enum.d.ts +5 -0
- package/lib/services/http/holding/holding-sale.service.d.ts +0 -3
- package/lib/services/http/holding/holding-type-messages.enum.d.ts +5 -0
- package/lib/services/http/holding/holding-type.service.d.ts +0 -3
- package/lib/services/http/holding/holding.service.d.ts +3 -6
- package/lib/services/http/holding/index.d.ts +3 -0
- package/lib/services/http/index.d.ts +1 -0
- package/lib/services/http/user/index.d.ts +1 -1
- package/lib/services/http/user/user.service.d.ts +0 -4
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/esm2020/lib/db/Models/user/client-details.mjs +0 -4
- package/esm2020/lib/db/Models/user/client-income-types.mjs +0 -4
- package/esm2020/lib/db/Models/user/occupation.mjs +0 -4
- package/esm2020/lib/services/http/user/occupation/occupation.service.mjs +0 -45
- /package/lib/db/Models/{user → client}/client-income-types.d.ts +0 -0
- /package/lib/db/Models/{user → client}/occupation.d.ts +0 -0
- /package/lib/services/http/{user → client}/occupation/occupation.service.d.ts +0 -0
|
@@ -648,16 +648,19 @@ let TransactionReceipt$1 = class TransactionReceipt extends AbstractModel {
|
|
|
648
648
|
let Transaction$1 = class Transaction extends TransactionBase {
|
|
649
649
|
};
|
|
650
650
|
|
|
651
|
+
let AnnualClientDetails$1 = class AnnualClientDetails {
|
|
652
|
+
};
|
|
653
|
+
|
|
651
654
|
let ClientDetails$1 = class ClientDetails extends AbstractModel {
|
|
652
655
|
};
|
|
653
656
|
|
|
654
657
|
let ClientIncomeTypes$1 = class ClientIncomeTypes extends ObservableModel {
|
|
655
658
|
};
|
|
656
659
|
|
|
657
|
-
let
|
|
660
|
+
let Occupation$1 = class Occupation extends AbstractModel {
|
|
658
661
|
};
|
|
659
662
|
|
|
660
|
-
let
|
|
663
|
+
let EmployeeDetails$1 = class EmployeeDetails extends AbstractModel {
|
|
661
664
|
};
|
|
662
665
|
|
|
663
666
|
let RegistrationInvite$1 = class RegistrationInvite extends AbstractModel {
|
|
@@ -1621,8 +1624,8 @@ class LoanCollection extends Collection {
|
|
|
1621
1624
|
}
|
|
1622
1625
|
|
|
1623
1626
|
class PropertySaleCollection extends Collection {
|
|
1624
|
-
get
|
|
1625
|
-
return this.create(this.items.filter((propertySale) => propertySale.
|
|
1627
|
+
get grossCapitalGain() {
|
|
1628
|
+
return this.create(this.items.filter((propertySale) => propertySale.grossCapitalGain > 0)).sumBy('grossCapitalGain');
|
|
1626
1629
|
}
|
|
1627
1630
|
/**
|
|
1628
1631
|
* Property sales are CGT applicable unless it has "Principle place of residence" exemption type
|
|
@@ -2149,6 +2152,16 @@ var DocumentTypeEnum;
|
|
|
2149
2152
|
DocumentTypeEnum[DocumentTypeEnum["INVOICE"] = 1] = "INVOICE";
|
|
2150
2153
|
})(DocumentTypeEnum || (DocumentTypeEnum = {}));
|
|
2151
2154
|
|
|
2155
|
+
var HoldingTypeCategoryEnum;
|
|
2156
|
+
(function (HoldingTypeCategoryEnum) {
|
|
2157
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["CRYPTO"] = 1] = "CRYPTO";
|
|
2158
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["STOCK"] = 2] = "STOCK";
|
|
2159
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["UNLISTED_STOCK"] = 3] = "UNLISTED_STOCK";
|
|
2160
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["UNLISTED_UNIT"] = 4] = "UNLISTED_UNIT";
|
|
2161
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["COLLECTIBLE"] = 5] = "COLLECTIBLE";
|
|
2162
|
+
HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["OTHER"] = 6] = "OTHER";
|
|
2163
|
+
})(HoldingTypeCategoryEnum || (HoldingTypeCategoryEnum = {}));
|
|
2164
|
+
|
|
2152
2165
|
// @TODO Artem TT-2308 move everything
|
|
2153
2166
|
|
|
2154
2167
|
class DepreciationCapitalProject extends DepreciationCapitalProject$1 {
|
|
@@ -3563,6 +3576,12 @@ var TaxExemptionEnum;
|
|
|
3563
3576
|
TaxExemptionEnum[TaxExemptionEnum["OTHER"] = 7] = "OTHER";
|
|
3564
3577
|
})(TaxExemptionEnum || (TaxExemptionEnum = {}));
|
|
3565
3578
|
|
|
3579
|
+
class TaxExemption extends TaxExemption$1 {
|
|
3580
|
+
isPartial() {
|
|
3581
|
+
return [TaxExemptionEnum.INVESTMENT_TO_PPR, TaxExemptionEnum.PPR_TO_INVESTMENT].includes(this.id);
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3566
3585
|
class PropertySale extends PropertySale$1 {
|
|
3567
3586
|
get saleCostsTotalAmount() {
|
|
3568
3587
|
return this.commission + this.legalFees + this.otherCost;
|
|
@@ -3574,13 +3593,22 @@ class PropertySale extends PropertySale$1 {
|
|
|
3574
3593
|
isCGTApplicable() {
|
|
3575
3594
|
return this.taxExemption?.id !== TaxExemptionEnum.PPR;
|
|
3576
3595
|
}
|
|
3577
|
-
get
|
|
3578
|
-
return this.
|
|
3579
|
-
}
|
|
3580
|
-
get grossCGTAfterLoss() {
|
|
3581
|
-
return this.grossCGT - this.lossApplied;
|
|
3596
|
+
get netPrice() {
|
|
3597
|
+
return this.price - this.saleCostsTotalAmount;
|
|
3582
3598
|
}
|
|
3583
3599
|
}
|
|
3600
|
+
__decorate([
|
|
3601
|
+
Type(() => Number)
|
|
3602
|
+
], PropertySale.prototype, "holdingCosts", void 0);
|
|
3603
|
+
__decorate([
|
|
3604
|
+
Type(() => Number)
|
|
3605
|
+
], PropertySale.prototype, "structuralImprovementsWDV", void 0);
|
|
3606
|
+
__decorate([
|
|
3607
|
+
Type(() => Number)
|
|
3608
|
+
], PropertySale.prototype, "buildingAtCostClaimed", void 0);
|
|
3609
|
+
__decorate([
|
|
3610
|
+
Type(() => Number)
|
|
3611
|
+
], PropertySale.prototype, "price", void 0);
|
|
3584
3612
|
__decorate([
|
|
3585
3613
|
Type(() => Number)
|
|
3586
3614
|
], PropertySale.prototype, "commission", void 0);
|
|
@@ -3596,6 +3624,9 @@ __decorate([
|
|
|
3596
3624
|
__decorate([
|
|
3597
3625
|
Type(() => Date)
|
|
3598
3626
|
], PropertySale.prototype, "contractDate", void 0);
|
|
3627
|
+
__decorate([
|
|
3628
|
+
Type(() => TaxExemption)
|
|
3629
|
+
], PropertySale.prototype, "taxExemption", void 0);
|
|
3599
3630
|
__decorate([
|
|
3600
3631
|
Type(() => PropertySaleTaxExemptionMetaField$1)
|
|
3601
3632
|
], PropertySale.prototype, "taxExemptionMetaFields", void 0);
|
|
@@ -3619,9 +3650,6 @@ class PropertySaleCostBase {
|
|
|
3619
3650
|
class PropertySaleTaxExemptionMetaField extends PropertySaleTaxExemptionMetaField$1 {
|
|
3620
3651
|
}
|
|
3621
3652
|
|
|
3622
|
-
class TaxExemption extends TaxExemption$1 {
|
|
3623
|
-
}
|
|
3624
|
-
|
|
3625
3653
|
class TaxExemptionMetaField extends TaxExemptionMetaField$1 {
|
|
3626
3654
|
}
|
|
3627
3655
|
|
|
@@ -7013,6 +7041,32 @@ class UserEventSettingCollection extends Collection {
|
|
|
7013
7041
|
class UserEventTypeCollection extends Collection {
|
|
7014
7042
|
}
|
|
7015
7043
|
|
|
7044
|
+
class HoldingCollection extends Collection {
|
|
7045
|
+
getShares() {
|
|
7046
|
+
return this.filterBy('type.category', HoldingTypeCategoryEnum.STOCK);
|
|
7047
|
+
}
|
|
7048
|
+
getCryptos() {
|
|
7049
|
+
return this.filterBy('type.category', HoldingTypeCategoryEnum.CRYPTO);
|
|
7050
|
+
}
|
|
7051
|
+
getOthers() {
|
|
7052
|
+
return this.filterBy('type.category', [
|
|
7053
|
+
HoldingTypeCategoryEnum.COLLECTIBLE,
|
|
7054
|
+
HoldingTypeCategoryEnum.UNLISTED_STOCK,
|
|
7055
|
+
HoldingTypeCategoryEnum.UNLISTED_UNIT,
|
|
7056
|
+
HoldingTypeCategoryEnum.OTHER
|
|
7057
|
+
]);
|
|
7058
|
+
}
|
|
7059
|
+
getPurchaseValue() {
|
|
7060
|
+
return this.sumBy('purchaseValue');
|
|
7061
|
+
}
|
|
7062
|
+
getMarketValue(holdingTypesById) {
|
|
7063
|
+
return this.items.reduce((sum, holding) => sum + holding.getMarketValue(holdingTypesById.get(holding.type.id)), 0);
|
|
7064
|
+
}
|
|
7065
|
+
getGrowthCoefficient(holdingTypesById) {
|
|
7066
|
+
return this.getMarketValue(holdingTypesById) / this.getPurchaseValue() - 1;
|
|
7067
|
+
}
|
|
7068
|
+
}
|
|
7069
|
+
|
|
7016
7070
|
// @TODO Alex move here all collections
|
|
7017
7071
|
|
|
7018
7072
|
class ServiceSubscription extends ServiceSubscription$1 {
|
|
@@ -7398,17 +7452,14 @@ class Property extends Property$1 {
|
|
|
7398
7452
|
}
|
|
7399
7453
|
return this.purchasePrice + this.capitalCostsTotalAmount + sale.holdingCosts + sale.structuralImprovementsWDV - sale.buildingAtCostClaimed;
|
|
7400
7454
|
}
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
*/
|
|
7404
|
-
calculateGrossCGT(sale) {
|
|
7405
|
-
return (sale.price - sale.saleCostsTotalAmount - this.calculateCostBase(sale)) * this.shareRatio;
|
|
7455
|
+
calculateGrossCapitalGain(sale) {
|
|
7456
|
+
return (sale.netPrice - this.calculateCostBase(sale)) * this.getPartialCGTExemptionRatio(sale) * this.shareRatio;
|
|
7406
7457
|
}
|
|
7407
7458
|
/**
|
|
7408
|
-
* net capital gain
|
|
7459
|
+
* net capital gain includes tax exemption
|
|
7409
7460
|
*/
|
|
7410
|
-
|
|
7411
|
-
return this.getCGTExemptionRatio(sale) * sale.
|
|
7461
|
+
calculateNetCapitalGain(sale) {
|
|
7462
|
+
return this.getCGTExemptionRatio(sale) * sale.grossCapitalGain;
|
|
7412
7463
|
}
|
|
7413
7464
|
/**
|
|
7414
7465
|
* guess tax exemption based on property details
|
|
@@ -7428,24 +7479,29 @@ class Property extends Property$1 {
|
|
|
7428
7479
|
return null;
|
|
7429
7480
|
}
|
|
7430
7481
|
}
|
|
7482
|
+
getPartialCGTExemptionRatio(sale) {
|
|
7483
|
+
const metaFields = new PropertySaleTaxExemptionMetaFieldCollection(sale.taxExemptionMetaFields);
|
|
7484
|
+
switch (sale.taxExemption?.id) {
|
|
7485
|
+
case TaxExemptionEnum.INVESTMENT_TO_PPR:
|
|
7486
|
+
const ownershipDays = this.getOwnershipDuration(sale);
|
|
7487
|
+
return (ownershipDays - metaFields.getPPRDays()) / ownershipDays;
|
|
7488
|
+
case TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
7489
|
+
return metaFields.getClaimPercent() / 100;
|
|
7490
|
+
default:
|
|
7491
|
+
return 1;
|
|
7492
|
+
}
|
|
7493
|
+
}
|
|
7431
7494
|
/**
|
|
7432
7495
|
* tax exemption can reduce cgt from 100% to less (up to zero)
|
|
7433
7496
|
*/
|
|
7434
7497
|
getCGTExemptionRatio(sale) {
|
|
7435
|
-
const metaFields = new PropertySaleTaxExemptionMetaFieldCollection(sale.taxExemptionMetaFields);
|
|
7436
7498
|
switch (sale.taxExemption?.id) {
|
|
7437
7499
|
// 50% exemption for investments owned for at least one year
|
|
7438
7500
|
case TaxExemptionEnum.ONE_YEAR_RULE:
|
|
7439
7501
|
return 0.5;
|
|
7440
|
-
// investment property become main residence (exemption for main residence ownership duration)
|
|
7441
7502
|
case TaxExemptionEnum.INVESTMENT_TO_PPR:
|
|
7442
|
-
const ownershipDays = this.getOwnershipDuration(sale);
|
|
7443
|
-
return (ownershipDays - metaFields.getPPRDays()) / ownershipDays;
|
|
7444
|
-
// main residence become investment (exemption for home office percent usage)
|
|
7445
7503
|
case TaxExemptionEnum.PPR_TO_INVESTMENT:
|
|
7446
|
-
|
|
7447
|
-
const ratio = this.isOneYearExemptionApplicable(sale) ? 0.5 : 1;
|
|
7448
|
-
return metaFields.getClaimPercent() / 100 * ratio;
|
|
7504
|
+
return this.isOneYearExemptionApplicable(sale) ? 0.5 : 1;
|
|
7449
7505
|
// full exemption
|
|
7450
7506
|
case TaxExemptionEnum.PPR:
|
|
7451
7507
|
case TaxExemptionEnum.SIX_YEARS_RULE:
|
|
@@ -7457,8 +7513,11 @@ class Property extends Property$1 {
|
|
|
7457
7513
|
return 1;
|
|
7458
7514
|
}
|
|
7459
7515
|
}
|
|
7516
|
+
/**
|
|
7517
|
+
* in cgt report we apply losses, which can reset 1 year rule (in case if there is no profit after loss)
|
|
7518
|
+
*/
|
|
7460
7519
|
isOneYearExemptionApplicable(sale) {
|
|
7461
|
-
return sale.
|
|
7520
|
+
return sale.grossCapitalGain > 0 && this.getOwnershipDuration(sale, 'years') > 0;
|
|
7462
7521
|
}
|
|
7463
7522
|
/**
|
|
7464
7523
|
* CGT is not applicable for properties acquired before 20.09.1985 (tax didn't exist before this date).
|
|
@@ -7487,6 +7546,12 @@ class Property extends Property$1 {
|
|
|
7487
7546
|
* Any assets acquired before this day are CGT exempt (because the tax didn't exist before this date).
|
|
7488
7547
|
*/
|
|
7489
7548
|
Property.preCGTAssetDate = new Date(1985, 9, 20);
|
|
7549
|
+
__decorate([
|
|
7550
|
+
Type(() => Number)
|
|
7551
|
+
], Property.prototype, "purchasePrice", void 0);
|
|
7552
|
+
__decorate([
|
|
7553
|
+
Type(() => Number)
|
|
7554
|
+
], Property.prototype, "growthPercent", void 0);
|
|
7490
7555
|
__decorate([
|
|
7491
7556
|
Type(() => Date)
|
|
7492
7557
|
], Property.prototype, "contractDate", void 0);
|
|
@@ -7499,6 +7564,15 @@ __decorate([
|
|
|
7499
7564
|
__decorate([
|
|
7500
7565
|
Type(() => PropertyCategory)
|
|
7501
7566
|
], Property.prototype, "category", void 0);
|
|
7567
|
+
__decorate([
|
|
7568
|
+
Type(() => Number)
|
|
7569
|
+
], Property.prototype, "stampDuty", void 0);
|
|
7570
|
+
__decorate([
|
|
7571
|
+
Type(() => Number)
|
|
7572
|
+
], Property.prototype, "legalFees", void 0);
|
|
7573
|
+
__decorate([
|
|
7574
|
+
Type(() => Number)
|
|
7575
|
+
], Property.prototype, "otherCapitalCosts", void 0);
|
|
7502
7576
|
__decorate([
|
|
7503
7577
|
Type(() => PropertyValuation)
|
|
7504
7578
|
], Property.prototype, "valuations", void 0);
|
|
@@ -8256,19 +8330,109 @@ __decorate([
|
|
|
8256
8330
|
Type(() => Document)
|
|
8257
8331
|
], DocumentFolder.prototype, "documents", void 0);
|
|
8258
8332
|
|
|
8333
|
+
class HoldingTypeExchange extends AbstractModel {
|
|
8334
|
+
}
|
|
8335
|
+
__decorate([
|
|
8336
|
+
Type(() => Date)
|
|
8337
|
+
], HoldingTypeExchange.prototype, "updateDate", void 0);
|
|
8338
|
+
__decorate([
|
|
8339
|
+
Type(() => HoldingType)
|
|
8340
|
+
], HoldingTypeExchange.prototype, "holdingTypes", void 0);
|
|
8341
|
+
|
|
8259
8342
|
class HoldingType extends AbstractModel {
|
|
8343
|
+
get categoryLabel() {
|
|
8344
|
+
switch (this.category) {
|
|
8345
|
+
case HoldingTypeCategoryEnum.STOCK:
|
|
8346
|
+
return 'Shares';
|
|
8347
|
+
case HoldingTypeCategoryEnum.CRYPTO:
|
|
8348
|
+
return 'Cryptos';
|
|
8349
|
+
case HoldingTypeCategoryEnum.COLLECTIBLE:
|
|
8350
|
+
return 'Collectibles';
|
|
8351
|
+
case HoldingTypeCategoryEnum.UNLISTED_STOCK:
|
|
8352
|
+
return 'Unlisted stock';
|
|
8353
|
+
case HoldingTypeCategoryEnum.UNLISTED_UNIT:
|
|
8354
|
+
return 'Unlisted unit';
|
|
8355
|
+
case HoldingTypeCategoryEnum.OTHER:
|
|
8356
|
+
return 'Other';
|
|
8357
|
+
}
|
|
8358
|
+
}
|
|
8359
|
+
isOther() {
|
|
8360
|
+
return !this.isShare() && !this.isCrypto();
|
|
8361
|
+
}
|
|
8362
|
+
isShare() {
|
|
8363
|
+
return this.category === HoldingTypeCategoryEnum.STOCK;
|
|
8364
|
+
}
|
|
8365
|
+
isCrypto() {
|
|
8366
|
+
return this.category === HoldingTypeCategoryEnum.CRYPTO;
|
|
8367
|
+
}
|
|
8260
8368
|
}
|
|
8369
|
+
__decorate([
|
|
8370
|
+
Type(() => Date)
|
|
8371
|
+
], HoldingType.prototype, "lastUpdateDateOnExchange", void 0);
|
|
8372
|
+
__decorate([
|
|
8373
|
+
Type(() => Date)
|
|
8374
|
+
], HoldingType.prototype, "updatedAt", void 0);
|
|
8261
8375
|
__decorate([
|
|
8262
8376
|
Type(() => User)
|
|
8263
8377
|
], HoldingType.prototype, "user", void 0);
|
|
8378
|
+
__decorate([
|
|
8379
|
+
Type(() => HoldingTypeExchange)
|
|
8380
|
+
], HoldingType.prototype, "exchange", void 0);
|
|
8264
8381
|
|
|
8265
8382
|
class HoldingSale extends AbstractModel {
|
|
8383
|
+
getCapitalGain(holding) {
|
|
8384
|
+
if (!this.price || !this.holding) {
|
|
8385
|
+
return 0;
|
|
8386
|
+
}
|
|
8387
|
+
return (this.price - holding.price) * this.quantity;
|
|
8388
|
+
}
|
|
8389
|
+
getNetCapitalGain(holding) {
|
|
8390
|
+
const capitalGain = this.getCapitalGain(holding);
|
|
8391
|
+
// 50% discount for holdings purchased over a year ago
|
|
8392
|
+
if (holding.heldMoreYear()) {
|
|
8393
|
+
return capitalGain / 2;
|
|
8394
|
+
}
|
|
8395
|
+
return capitalGain;
|
|
8396
|
+
}
|
|
8266
8397
|
}
|
|
8398
|
+
__decorate([
|
|
8399
|
+
Type(() => Date)
|
|
8400
|
+
], HoldingSale.prototype, "date", void 0);
|
|
8267
8401
|
__decorate([
|
|
8268
8402
|
Type(() => AppFile)
|
|
8269
8403
|
], HoldingSale.prototype, "file", void 0);
|
|
8270
8404
|
|
|
8271
8405
|
class Holding extends AbstractModel {
|
|
8406
|
+
constructor() {
|
|
8407
|
+
super(...arguments);
|
|
8408
|
+
this.isTaxFree = false;
|
|
8409
|
+
}
|
|
8410
|
+
/**
|
|
8411
|
+
* Get total purchasing price
|
|
8412
|
+
*/
|
|
8413
|
+
get purchaseValue() {
|
|
8414
|
+
// Price and entity may be empty when we use HoldingForm.currentValue
|
|
8415
|
+
if (!this.price || !this.quantity) {
|
|
8416
|
+
return 0;
|
|
8417
|
+
}
|
|
8418
|
+
return this.price * this.quantity;
|
|
8419
|
+
}
|
|
8420
|
+
/**
|
|
8421
|
+
* Get current market price
|
|
8422
|
+
*/
|
|
8423
|
+
getMarketValue(holdingType) {
|
|
8424
|
+
return this.quantity * holdingType.price;
|
|
8425
|
+
}
|
|
8426
|
+
/**
|
|
8427
|
+
* Get percent difference between current and buy price
|
|
8428
|
+
*/
|
|
8429
|
+
getGrowthCoefficient(holdingType) {
|
|
8430
|
+
return holdingType.price / this.price - 1;
|
|
8431
|
+
}
|
|
8432
|
+
heldMoreYear() {
|
|
8433
|
+
const yearTime = 1000 * 60 * 60 * 24 * 365;
|
|
8434
|
+
return (new FinancialYear().startDate.getTime() - this.date.getTime()) > yearTime;
|
|
8435
|
+
}
|
|
8272
8436
|
}
|
|
8273
8437
|
__decorate([
|
|
8274
8438
|
Type(() => Date)
|
|
@@ -8287,6 +8451,176 @@ __decorate([
|
|
|
8287
8451
|
Transform(({ value }) => new Collection(value))
|
|
8288
8452
|
], Holding.prototype, "sales", void 0);
|
|
8289
8453
|
|
|
8454
|
+
class AnnualClientDetails extends AbstractModel {
|
|
8455
|
+
constructor() {
|
|
8456
|
+
super(...arguments);
|
|
8457
|
+
this.financialYear = new FinancialYear().year;
|
|
8458
|
+
}
|
|
8459
|
+
}
|
|
8460
|
+
__decorate([
|
|
8461
|
+
Type(() => ClientDetails)
|
|
8462
|
+
], AnnualClientDetails.prototype, "clientDetails", void 0);
|
|
8463
|
+
|
|
8464
|
+
class ClientIncomeTypes extends ClientIncomeTypes$1 {
|
|
8465
|
+
/**
|
|
8466
|
+
* Get count of selected income types
|
|
8467
|
+
*/
|
|
8468
|
+
get length() {
|
|
8469
|
+
return Object.values(this).filter((value) => typeof value === 'boolean' && value).length;
|
|
8470
|
+
}
|
|
8471
|
+
}
|
|
8472
|
+
|
|
8473
|
+
var ClientInviteStatusEnum;
|
|
8474
|
+
(function (ClientInviteStatusEnum) {
|
|
8475
|
+
ClientInviteStatusEnum[ClientInviteStatusEnum["PENDING"] = 1] = "PENDING";
|
|
8476
|
+
ClientInviteStatusEnum[ClientInviteStatusEnum["REJECTED"] = 2] = "REJECTED";
|
|
8477
|
+
})(ClientInviteStatusEnum || (ClientInviteStatusEnum = {}));
|
|
8478
|
+
|
|
8479
|
+
var ClientInviteTypeEnum;
|
|
8480
|
+
(function (ClientInviteTypeEnum) {
|
|
8481
|
+
ClientInviteTypeEnum[ClientInviteTypeEnum["FROM_CLIENT"] = 1] = "FROM_CLIENT";
|
|
8482
|
+
ClientInviteTypeEnum[ClientInviteTypeEnum["FROM_EMPLOYEE"] = 2] = "FROM_EMPLOYEE";
|
|
8483
|
+
})(ClientInviteTypeEnum || (ClientInviteTypeEnum = {}));
|
|
8484
|
+
|
|
8485
|
+
class ClientInvite extends ClientInvite$1 {
|
|
8486
|
+
/**
|
|
8487
|
+
* Check if client invite status is pending
|
|
8488
|
+
*/
|
|
8489
|
+
isPending() {
|
|
8490
|
+
return this.status === ClientInviteStatusEnum.PENDING;
|
|
8491
|
+
}
|
|
8492
|
+
/**
|
|
8493
|
+
* Check if client invite status is accepted
|
|
8494
|
+
*/
|
|
8495
|
+
isAccepted() {
|
|
8496
|
+
return !this.isPending() && !this.isRejected();
|
|
8497
|
+
}
|
|
8498
|
+
/**
|
|
8499
|
+
* Check if client invite status is rejected
|
|
8500
|
+
*/
|
|
8501
|
+
isRejected() {
|
|
8502
|
+
return this.status === ClientInviteStatusEnum.REJECTED;
|
|
8503
|
+
}
|
|
8504
|
+
/**
|
|
8505
|
+
* Check if client invite initiated by firm
|
|
8506
|
+
*/
|
|
8507
|
+
isFromEmployee() {
|
|
8508
|
+
return this.type === ClientInviteTypeEnum.FROM_EMPLOYEE;
|
|
8509
|
+
}
|
|
8510
|
+
/**
|
|
8511
|
+
* Check if client invite initiated by client
|
|
8512
|
+
*/
|
|
8513
|
+
isFromClient() {
|
|
8514
|
+
return this.type === ClientInviteTypeEnum.FROM_CLIENT;
|
|
8515
|
+
}
|
|
8516
|
+
get firstName() {
|
|
8517
|
+
return this.client ? this.client.firstName : this.registrationInvite?.firstName;
|
|
8518
|
+
}
|
|
8519
|
+
get email() {
|
|
8520
|
+
return this.client ? this.client.email : this.registrationInvite?.email;
|
|
8521
|
+
}
|
|
8522
|
+
}
|
|
8523
|
+
__decorate([
|
|
8524
|
+
Type(() => Date)
|
|
8525
|
+
], ClientInvite.prototype, "sentOn", void 0);
|
|
8526
|
+
__decorate([
|
|
8527
|
+
Type(() => Date)
|
|
8528
|
+
], ClientInvite.prototype, "updatedAt", void 0);
|
|
8529
|
+
__decorate([
|
|
8530
|
+
Type(() => Firm)
|
|
8531
|
+
], ClientInvite.prototype, "firm", void 0);
|
|
8532
|
+
__decorate([
|
|
8533
|
+
Type(() => User)
|
|
8534
|
+
], ClientInvite.prototype, "client", void 0);
|
|
8535
|
+
__decorate([
|
|
8536
|
+
Type(() => User)
|
|
8537
|
+
], ClientInvite.prototype, "employee", void 0);
|
|
8538
|
+
__decorate([
|
|
8539
|
+
Type(() => RegistrationInvite)
|
|
8540
|
+
], ClientInvite.prototype, "registrationInvite", void 0);
|
|
8541
|
+
|
|
8542
|
+
class ClientMovement extends ClientMovement$1 {
|
|
8543
|
+
}
|
|
8544
|
+
__decorate([
|
|
8545
|
+
Type(() => Firm)
|
|
8546
|
+
], ClientMovement.prototype, "firm", void 0);
|
|
8547
|
+
__decorate([
|
|
8548
|
+
Type(() => User)
|
|
8549
|
+
], ClientMovement.prototype, "client", void 0);
|
|
8550
|
+
__decorate([
|
|
8551
|
+
Type(() => User)
|
|
8552
|
+
], ClientMovement.prototype, "employee", void 0);
|
|
8553
|
+
__decorate([
|
|
8554
|
+
Type(() => ServiceSubscription)
|
|
8555
|
+
], ClientMovement.prototype, "subscription", void 0);
|
|
8556
|
+
__decorate([
|
|
8557
|
+
Type(() => Date)
|
|
8558
|
+
], ClientMovement.prototype, "dateFrom", void 0);
|
|
8559
|
+
__decorate([
|
|
8560
|
+
Type(() => Date)
|
|
8561
|
+
], ClientMovement.prototype, "dateTo", void 0);
|
|
8562
|
+
|
|
8563
|
+
/**
|
|
8564
|
+
* Client portfolio charts data based on ClientPortfolioReportCollection
|
|
8565
|
+
*/
|
|
8566
|
+
class ClientPortfolioChartData {
|
|
8567
|
+
constructor(clientsPortfolioReportCollection) {
|
|
8568
|
+
this.clientsPortfolioReportCollection = clientsPortfolioReportCollection;
|
|
8569
|
+
}
|
|
8570
|
+
getPieChartData() {
|
|
8571
|
+
return this.clientsPortfolioReportCollection.items.map((clientPortfolioReport) => {
|
|
8572
|
+
return plainToClass(ChartData, {
|
|
8573
|
+
name: clientPortfolioReport.category,
|
|
8574
|
+
data: clientPortfolioReport.count
|
|
8575
|
+
});
|
|
8576
|
+
});
|
|
8577
|
+
}
|
|
8578
|
+
getBarChartData() {
|
|
8579
|
+
return [
|
|
8580
|
+
plainToClass(ChartData, {
|
|
8581
|
+
name: 'Total',
|
|
8582
|
+
data: [
|
|
8583
|
+
{
|
|
8584
|
+
label: 'Market value',
|
|
8585
|
+
value: this.clientsPortfolioReportCollection.marketValue
|
|
8586
|
+
},
|
|
8587
|
+
{
|
|
8588
|
+
label: 'Loan balance',
|
|
8589
|
+
value: this.clientsPortfolioReportCollection.loanBalance
|
|
8590
|
+
},
|
|
8591
|
+
{
|
|
8592
|
+
label: 'Equity position',
|
|
8593
|
+
value: this.clientsPortfolioReportCollection.equityPosition
|
|
8594
|
+
}
|
|
8595
|
+
]
|
|
8596
|
+
}),
|
|
8597
|
+
plainToClass(ChartData, {
|
|
8598
|
+
name: 'Average',
|
|
8599
|
+
data: [
|
|
8600
|
+
{
|
|
8601
|
+
label: 'Market value',
|
|
8602
|
+
value: this.clientsPortfolioReportCollection.averageMarketValue
|
|
8603
|
+
},
|
|
8604
|
+
{
|
|
8605
|
+
label: 'Loan balance',
|
|
8606
|
+
value: this.clientsPortfolioReportCollection.averageLoanBalance
|
|
8607
|
+
},
|
|
8608
|
+
{
|
|
8609
|
+
label: 'Equity position',
|
|
8610
|
+
value: this.clientsPortfolioReportCollection.averageEquityPosition
|
|
8611
|
+
}
|
|
8612
|
+
]
|
|
8613
|
+
})
|
|
8614
|
+
];
|
|
8615
|
+
}
|
|
8616
|
+
}
|
|
8617
|
+
|
|
8618
|
+
/**
|
|
8619
|
+
* Class describes client's portfolio report information
|
|
8620
|
+
*/
|
|
8621
|
+
class ClientPortfolioReport extends AbstractModel {
|
|
8622
|
+
}
|
|
8623
|
+
|
|
8290
8624
|
const NAME_TOKEN = 'token';
|
|
8291
8625
|
const NAME_REFRESH_TOKEN = 'refreshToken';
|
|
8292
8626
|
class JwtService extends JwtHelperService {
|
|
@@ -8695,6 +9029,10 @@ const ENDPOINTS = {
|
|
|
8695
9029
|
CLIENT_INCOME_TYPES_POST: new Endpoint('POST', '\\/client-income-types'),
|
|
8696
9030
|
COUNTRIES_GET: new Endpoint('GET', '\\/countries'),
|
|
8697
9031
|
CORELOGIC_TOKEN_GET: new Endpoint('GET', '/access\\/oauth\\/token.*$'),
|
|
9032
|
+
ANNUAL_CLIENT_DETAILS_GET: new Endpoint('GET', '\\/annual-client-details'),
|
|
9033
|
+
ANNUAL_CLIENT_DETAILS_POST: new Endpoint('POST', '\\/annual-client-details'),
|
|
9034
|
+
ANNUAL_CLIENT_DETAILS_PUT: new Endpoint('PUT', '\\/annual-client-details\\/\\d+'),
|
|
9035
|
+
ANNUAL_CLIENT_DETAILS_DELETE: new Endpoint('DELETE', '\\/annual-client-details\\/\\d+'),
|
|
8698
9036
|
DEPRECIATIONS_OPENING_GET: new Endpoint('GET', '\\/depreciations\\/\\opening-balance\.\*'),
|
|
8699
9037
|
DEPRECIATIONS_GET: new Endpoint('GET', '\\/depreciations'),
|
|
8700
9038
|
DEPRECIATIONS_POST: new Endpoint('POST', '\\/depreciations'),
|
|
@@ -8737,6 +9075,18 @@ const ENDPOINTS = {
|
|
|
8737
9075
|
LOANS_PAYOUT_DELETE: new Endpoint('DELETE', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
|
8738
9076
|
LOANS_CALCULATION_POST: new Endpoint('POST', '\\/bank-accounts\\/loans\\/calculation'),
|
|
8739
9077
|
LOGIN_POST: new Endpoint('POST', '\\/login'),
|
|
9078
|
+
HOLDINGS_GET: new Endpoint('GET', '\\/holdings'),
|
|
9079
|
+
HOLDINGS_POST: new Endpoint('POST', '\\/holdings'),
|
|
9080
|
+
HOLDINGS_PUT: new Endpoint('PUT', '\\/holdings\\/\\d+'),
|
|
9081
|
+
HOLDINGS_DELETE: new Endpoint('DELETE', '\\/holdings\\/\\d+'),
|
|
9082
|
+
HOLDING_TYPES_GET: new Endpoint('GET', '\\/holding-types'),
|
|
9083
|
+
HOLDING_TYPES_POST: new Endpoint('POST', '\\/holding-types'),
|
|
9084
|
+
HOLDING_TYPES_PUT: new Endpoint('PUT', '\\/holding-types\\/\\d+'),
|
|
9085
|
+
HOLDING_TYPES_DELETE: new Endpoint('DELETE', '\\/holding-types\\/\\d+'),
|
|
9086
|
+
HOLDING_SALES_GET: new Endpoint('GET', '\\/holding-sales'),
|
|
9087
|
+
HOLDING_SALES_POST: new Endpoint('POST', '\\/holding-sales'),
|
|
9088
|
+
HOLDING_SALES_PUT: new Endpoint('PUT', '\\/holding-sales\\/\\d+'),
|
|
9089
|
+
HOLDING_SALES_DELETE: new Endpoint('DELETE', '\\/holding-sales\\/\\d+'),
|
|
8740
9090
|
NOTIFICATIONS_GET: new Endpoint('GET', '\\/service-notifications'),
|
|
8741
9091
|
OCCUPATIONS_GET: new Endpoint('GET', '\\/occupations'),
|
|
8742
9092
|
PROPERTIES_GET: new Endpoint('GET', '\\/properties'),
|
|
@@ -9600,7 +9950,6 @@ class UserService {
|
|
|
9600
9950
|
}
|
|
9601
9951
|
listenEvents() {
|
|
9602
9952
|
this.listenServiceSubscriptionUpdated();
|
|
9603
|
-
this.listenPropertySale();
|
|
9604
9953
|
}
|
|
9605
9954
|
get() {
|
|
9606
9955
|
if (!this.cache) {
|
|
@@ -9735,14 +10084,6 @@ class UserService {
|
|
|
9735
10084
|
listenServiceSubscriptionUpdated() {
|
|
9736
10085
|
this.eventDispatcherService.on(AppEventTypeEnum.SERVICE_SUBSCRIPTION_UPDATED).subscribe(() => this.resetCache());
|
|
9737
10086
|
}
|
|
9738
|
-
/**
|
|
9739
|
-
* capital losses updates on property sale
|
|
9740
|
-
*/
|
|
9741
|
-
listenPropertySale() {
|
|
9742
|
-
this.eventDispatcherService.on2(...PropertySale.getEventNames('post', 'delete')).subscribe(() => {
|
|
9743
|
-
this.resetCache();
|
|
9744
|
-
});
|
|
9745
|
-
}
|
|
9746
10087
|
/**
|
|
9747
10088
|
* @TODO remove when the class refactored on RestService
|
|
9748
10089
|
* Subscribe to http events and run callback.
|
|
@@ -9934,18 +10275,6 @@ var ClientDetailsWorkingHolidayMakerEnum;
|
|
|
9934
10275
|
ClientDetailsWorkingHolidayMakerEnum[ClientDetailsWorkingHolidayMakerEnum["VISA462"] = 2] = "VISA462";
|
|
9935
10276
|
})(ClientDetailsWorkingHolidayMakerEnum || (ClientDetailsWorkingHolidayMakerEnum = {}));
|
|
9936
10277
|
|
|
9937
|
-
var ClientInviteStatusEnum;
|
|
9938
|
-
(function (ClientInviteStatusEnum) {
|
|
9939
|
-
ClientInviteStatusEnum[ClientInviteStatusEnum["PENDING"] = 1] = "PENDING";
|
|
9940
|
-
ClientInviteStatusEnum[ClientInviteStatusEnum["REJECTED"] = 2] = "REJECTED";
|
|
9941
|
-
})(ClientInviteStatusEnum || (ClientInviteStatusEnum = {}));
|
|
9942
|
-
|
|
9943
|
-
var ClientInviteTypeEnum;
|
|
9944
|
-
(function (ClientInviteTypeEnum) {
|
|
9945
|
-
ClientInviteTypeEnum[ClientInviteTypeEnum["FROM_CLIENT"] = 1] = "FROM_CLIENT";
|
|
9946
|
-
ClientInviteTypeEnum[ClientInviteTypeEnum["FROM_EMPLOYEE"] = 2] = "FROM_EMPLOYEE";
|
|
9947
|
-
})(ClientInviteTypeEnum || (ClientInviteTypeEnum = {}));
|
|
9948
|
-
|
|
9949
10278
|
var DepreciationCalculationPercentEnum;
|
|
9950
10279
|
(function (DepreciationCalculationPercentEnum) {
|
|
9951
10280
|
DepreciationCalculationPercentEnum[DepreciationCalculationPercentEnum["PRIME_COST"] = 100] = "PRIME_COST";
|
|
@@ -10326,154 +10655,6 @@ class Badge extends AbstractModel {
|
|
|
10326
10655
|
}
|
|
10327
10656
|
}
|
|
10328
10657
|
|
|
10329
|
-
class ClientIncomeTypes extends ClientIncomeTypes$1 {
|
|
10330
|
-
/**
|
|
10331
|
-
* Get count of selected income types
|
|
10332
|
-
*/
|
|
10333
|
-
get length() {
|
|
10334
|
-
return Object.values(this).filter((value) => typeof value === 'boolean' && value).length;
|
|
10335
|
-
}
|
|
10336
|
-
}
|
|
10337
|
-
|
|
10338
|
-
class ClientInvite extends ClientInvite$1 {
|
|
10339
|
-
/**
|
|
10340
|
-
* Check if client invite status is pending
|
|
10341
|
-
*/
|
|
10342
|
-
isPending() {
|
|
10343
|
-
return this.status === ClientInviteStatusEnum.PENDING;
|
|
10344
|
-
}
|
|
10345
|
-
/**
|
|
10346
|
-
* Check if client invite status is accepted
|
|
10347
|
-
*/
|
|
10348
|
-
isAccepted() {
|
|
10349
|
-
return !this.isPending() && !this.isRejected();
|
|
10350
|
-
}
|
|
10351
|
-
/**
|
|
10352
|
-
* Check if client invite status is rejected
|
|
10353
|
-
*/
|
|
10354
|
-
isRejected() {
|
|
10355
|
-
return this.status === ClientInviteStatusEnum.REJECTED;
|
|
10356
|
-
}
|
|
10357
|
-
/**
|
|
10358
|
-
* Check if client invite initiated by firm
|
|
10359
|
-
*/
|
|
10360
|
-
isFromEmployee() {
|
|
10361
|
-
return this.type === ClientInviteTypeEnum.FROM_EMPLOYEE;
|
|
10362
|
-
}
|
|
10363
|
-
/**
|
|
10364
|
-
* Check if client invite initiated by client
|
|
10365
|
-
*/
|
|
10366
|
-
isFromClient() {
|
|
10367
|
-
return this.type === ClientInviteTypeEnum.FROM_CLIENT;
|
|
10368
|
-
}
|
|
10369
|
-
get firstName() {
|
|
10370
|
-
return this.client ? this.client.firstName : this.registrationInvite?.firstName;
|
|
10371
|
-
}
|
|
10372
|
-
get email() {
|
|
10373
|
-
return this.client ? this.client.email : this.registrationInvite?.email;
|
|
10374
|
-
}
|
|
10375
|
-
}
|
|
10376
|
-
__decorate([
|
|
10377
|
-
Type(() => Date)
|
|
10378
|
-
], ClientInvite.prototype, "sentOn", void 0);
|
|
10379
|
-
__decorate([
|
|
10380
|
-
Type(() => Date)
|
|
10381
|
-
], ClientInvite.prototype, "updatedAt", void 0);
|
|
10382
|
-
__decorate([
|
|
10383
|
-
Type(() => Firm)
|
|
10384
|
-
], ClientInvite.prototype, "firm", void 0);
|
|
10385
|
-
__decorate([
|
|
10386
|
-
Type(() => User)
|
|
10387
|
-
], ClientInvite.prototype, "client", void 0);
|
|
10388
|
-
__decorate([
|
|
10389
|
-
Type(() => User)
|
|
10390
|
-
], ClientInvite.prototype, "employee", void 0);
|
|
10391
|
-
__decorate([
|
|
10392
|
-
Type(() => RegistrationInvite)
|
|
10393
|
-
], ClientInvite.prototype, "registrationInvite", void 0);
|
|
10394
|
-
|
|
10395
|
-
class ClientMovement extends ClientMovement$1 {
|
|
10396
|
-
}
|
|
10397
|
-
__decorate([
|
|
10398
|
-
Type(() => Firm)
|
|
10399
|
-
], ClientMovement.prototype, "firm", void 0);
|
|
10400
|
-
__decorate([
|
|
10401
|
-
Type(() => User)
|
|
10402
|
-
], ClientMovement.prototype, "client", void 0);
|
|
10403
|
-
__decorate([
|
|
10404
|
-
Type(() => User)
|
|
10405
|
-
], ClientMovement.prototype, "employee", void 0);
|
|
10406
|
-
__decorate([
|
|
10407
|
-
Type(() => ServiceSubscription)
|
|
10408
|
-
], ClientMovement.prototype, "subscription", void 0);
|
|
10409
|
-
__decorate([
|
|
10410
|
-
Type(() => Date)
|
|
10411
|
-
], ClientMovement.prototype, "dateFrom", void 0);
|
|
10412
|
-
__decorate([
|
|
10413
|
-
Type(() => Date)
|
|
10414
|
-
], ClientMovement.prototype, "dateTo", void 0);
|
|
10415
|
-
|
|
10416
|
-
/**
|
|
10417
|
-
* Client portfolio charts data based on ClientPortfolioReportCollection
|
|
10418
|
-
*/
|
|
10419
|
-
class ClientPortfolioChartData {
|
|
10420
|
-
constructor(clientsPortfolioReportCollection) {
|
|
10421
|
-
this.clientsPortfolioReportCollection = clientsPortfolioReportCollection;
|
|
10422
|
-
}
|
|
10423
|
-
getPieChartData() {
|
|
10424
|
-
return this.clientsPortfolioReportCollection.items.map((clientPortfolioReport) => {
|
|
10425
|
-
return plainToClass(ChartData, {
|
|
10426
|
-
name: clientPortfolioReport.category,
|
|
10427
|
-
data: clientPortfolioReport.count
|
|
10428
|
-
});
|
|
10429
|
-
});
|
|
10430
|
-
}
|
|
10431
|
-
getBarChartData() {
|
|
10432
|
-
return [
|
|
10433
|
-
plainToClass(ChartData, {
|
|
10434
|
-
name: 'Total',
|
|
10435
|
-
data: [
|
|
10436
|
-
{
|
|
10437
|
-
label: 'Market value',
|
|
10438
|
-
value: this.clientsPortfolioReportCollection.marketValue
|
|
10439
|
-
},
|
|
10440
|
-
{
|
|
10441
|
-
label: 'Loan balance',
|
|
10442
|
-
value: this.clientsPortfolioReportCollection.loanBalance
|
|
10443
|
-
},
|
|
10444
|
-
{
|
|
10445
|
-
label: 'Equity position',
|
|
10446
|
-
value: this.clientsPortfolioReportCollection.equityPosition
|
|
10447
|
-
}
|
|
10448
|
-
]
|
|
10449
|
-
}),
|
|
10450
|
-
plainToClass(ChartData, {
|
|
10451
|
-
name: 'Average',
|
|
10452
|
-
data: [
|
|
10453
|
-
{
|
|
10454
|
-
label: 'Market value',
|
|
10455
|
-
value: this.clientsPortfolioReportCollection.averageMarketValue
|
|
10456
|
-
},
|
|
10457
|
-
{
|
|
10458
|
-
label: 'Loan balance',
|
|
10459
|
-
value: this.clientsPortfolioReportCollection.averageLoanBalance
|
|
10460
|
-
},
|
|
10461
|
-
{
|
|
10462
|
-
label: 'Equity position',
|
|
10463
|
-
value: this.clientsPortfolioReportCollection.averageEquityPosition
|
|
10464
|
-
}
|
|
10465
|
-
]
|
|
10466
|
-
})
|
|
10467
|
-
];
|
|
10468
|
-
}
|
|
10469
|
-
}
|
|
10470
|
-
|
|
10471
|
-
/**
|
|
10472
|
-
* Class describes client's portfolio report information
|
|
10473
|
-
*/
|
|
10474
|
-
class ClientPortfolioReport extends AbstractModel {
|
|
10475
|
-
}
|
|
10476
|
-
|
|
10477
10658
|
var AlphabetColorsEnum;
|
|
10478
10659
|
(function (AlphabetColorsEnum) {
|
|
10479
10660
|
AlphabetColorsEnum["A"] = "#9CC3D5";
|
|
@@ -10797,8 +10978,8 @@ class MyTaxBusinessLosses {
|
|
|
10797
10978
|
}
|
|
10798
10979
|
}
|
|
10799
10980
|
|
|
10800
|
-
;
|
|
10801
10981
|
/**
|
|
10982
|
+
* @TODO vik/nicole test
|
|
10802
10983
|
* Report related to Property sales CGT details.
|
|
10803
10984
|
* All fields are about current year, except netCapitalLoss
|
|
10804
10985
|
*
|
|
@@ -10806,10 +10987,11 @@ class MyTaxBusinessLosses {
|
|
|
10806
10987
|
class MyTaxCgt {
|
|
10807
10988
|
static createFrom(propertySales, properties, clientCapitalLoss) {
|
|
10808
10989
|
return plainToClass(MyTaxCgt, {
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10990
|
+
// @TODO vik losses should be applied
|
|
10991
|
+
hasCapitalGain: !!propertySales.grossCapitalGain,
|
|
10992
|
+
hasExemption: !!propertySales.grossCapitalGain && this.isCGTApplicable(propertySales, properties),
|
|
10993
|
+
netCapitalGain: propertySales.sumBy('netCapitalGain'),
|
|
10994
|
+
grossCapitalGain: propertySales.grossCapitalGain,
|
|
10813
10995
|
netCapitalLoss: clientCapitalLoss
|
|
10814
10996
|
});
|
|
10815
10997
|
}
|
|
@@ -14036,12 +14218,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
14036
14218
|
args: ['environment']
|
|
14037
14219
|
}] }, { type: ToastService }, { type: SseService }]; } });
|
|
14038
14220
|
|
|
14039
|
-
var MessagesEnum$
|
|
14221
|
+
var MessagesEnum$3;
|
|
14040
14222
|
(function (MessagesEnum) {
|
|
14041
14223
|
MessagesEnum["LOGO_UPDATED"] = "Logo updated successfully";
|
|
14042
14224
|
MessagesEnum["LOGO_ERROR_FORMAT"] = "Wrong file format. Allowed extensions: jpg, img, png";
|
|
14043
14225
|
MessagesEnum["LOGO_ERROR_SIZE"] = "The file is too big. Maximum size is 2mb";
|
|
14044
|
-
})(MessagesEnum$
|
|
14226
|
+
})(MessagesEnum$3 || (MessagesEnum$3 = {}));
|
|
14045
14227
|
|
|
14046
14228
|
class SoleBusinessService extends RestService {
|
|
14047
14229
|
constructor() {
|
|
@@ -14065,7 +14247,7 @@ class SoleBusinessService extends RestService {
|
|
|
14065
14247
|
replace(tempCache, plainToClass(SoleBusiness, updatedBusiness));
|
|
14066
14248
|
this.cache = tempCache;
|
|
14067
14249
|
this.cacheSubject.next(this.cache);
|
|
14068
|
-
this.toastService.success(MessagesEnum$
|
|
14250
|
+
this.toastService.success(MessagesEnum$3.LOGO_UPDATED);
|
|
14069
14251
|
}), catchError((error) => {
|
|
14070
14252
|
// Show error when user provided wrong image (format or size)
|
|
14071
14253
|
if (error.status === 422) {
|
|
@@ -15504,6 +15686,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
15504
15686
|
}]
|
|
15505
15687
|
}] });
|
|
15506
15688
|
|
|
15689
|
+
class AnnualClientDetailsService extends RestService$1 {
|
|
15690
|
+
constructor() {
|
|
15691
|
+
super(...arguments);
|
|
15692
|
+
this.modelClass = AnnualClientDetails;
|
|
15693
|
+
this.collectionClass = Collection;
|
|
15694
|
+
this.endpointUri = 'annual-client-details';
|
|
15695
|
+
this.isApiPlatform = true;
|
|
15696
|
+
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch', 'delete'];
|
|
15697
|
+
}
|
|
15698
|
+
}
|
|
15699
|
+
AnnualClientDetailsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AnnualClientDetailsService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
15700
|
+
AnnualClientDetailsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AnnualClientDetailsService, providedIn: 'root' });
|
|
15701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: AnnualClientDetailsService, decorators: [{
|
|
15702
|
+
type: Injectable,
|
|
15703
|
+
args: [{
|
|
15704
|
+
providedIn: 'root'
|
|
15705
|
+
}]
|
|
15706
|
+
}] });
|
|
15707
|
+
|
|
15507
15708
|
/**
|
|
15508
15709
|
* Service that works with Occupations
|
|
15509
15710
|
*/
|
|
@@ -15621,14 +15822,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
15621
15822
|
}]
|
|
15622
15823
|
}] });
|
|
15623
15824
|
|
|
15624
|
-
/**
|
|
15625
|
-
* Service that handling banks logic
|
|
15626
|
-
*/
|
|
15627
15825
|
class HoldingService extends RestService$1 {
|
|
15628
15826
|
constructor() {
|
|
15629
15827
|
super(...arguments);
|
|
15630
15828
|
this.modelClass = Holding;
|
|
15631
|
-
this.collectionClass =
|
|
15829
|
+
this.collectionClass = HoldingCollection;
|
|
15632
15830
|
this.endpointUri = 'holdings';
|
|
15633
15831
|
this.isApiPlatform = true;
|
|
15634
15832
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
|
@@ -15643,9 +15841,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
15643
15841
|
}]
|
|
15644
15842
|
}] });
|
|
15645
15843
|
|
|
15646
|
-
/**
|
|
15647
|
-
* Service that handling banks logic
|
|
15648
|
-
*/
|
|
15649
15844
|
class HoldingTypeService extends RestService$1 {
|
|
15650
15845
|
constructor() {
|
|
15651
15846
|
super(...arguments);
|
|
@@ -15665,9 +15860,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
15665
15860
|
}]
|
|
15666
15861
|
}] });
|
|
15667
15862
|
|
|
15668
|
-
/**
|
|
15669
|
-
* Service that handling banks logic
|
|
15670
|
-
*/
|
|
15671
15863
|
class HoldingSaleService extends RestService$1 {
|
|
15672
15864
|
constructor() {
|
|
15673
15865
|
super(...arguments);
|
|
@@ -15687,6 +15879,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImpor
|
|
|
15687
15879
|
}]
|
|
15688
15880
|
}] });
|
|
15689
15881
|
|
|
15882
|
+
var HoldingMessagesEnum;
|
|
15883
|
+
(function (HoldingMessagesEnum) {
|
|
15884
|
+
HoldingMessagesEnum["CREATED"] = "Holding created successfully";
|
|
15885
|
+
HoldingMessagesEnum["UPDATED"] = "Holding updated successfully";
|
|
15886
|
+
HoldingMessagesEnum["DELETED"] = "Holding deleted successfully";
|
|
15887
|
+
})(HoldingMessagesEnum || (HoldingMessagesEnum = {}));
|
|
15888
|
+
|
|
15889
|
+
var HoldingSaleMessagesEnum;
|
|
15890
|
+
(function (HoldingSaleMessagesEnum) {
|
|
15891
|
+
HoldingSaleMessagesEnum["CREATED"] = "Holding sold successfully";
|
|
15892
|
+
HoldingSaleMessagesEnum["UPDATED"] = "Sale updated successfully";
|
|
15893
|
+
HoldingSaleMessagesEnum["DELETED"] = "Sale deleted successfully";
|
|
15894
|
+
})(HoldingSaleMessagesEnum || (HoldingSaleMessagesEnum = {}));
|
|
15895
|
+
|
|
15896
|
+
var HoldingTypeMessagesEnum;
|
|
15897
|
+
(function (HoldingTypeMessagesEnum) {
|
|
15898
|
+
HoldingTypeMessagesEnum["CREATED"] = "Holding type created successfully";
|
|
15899
|
+
HoldingTypeMessagesEnum["UPDATED"] = "Holding type updated successfully";
|
|
15900
|
+
HoldingTypeMessagesEnum["DELETED"] = "Holding type deleted successfully";
|
|
15901
|
+
})(HoldingTypeMessagesEnum || (HoldingTypeMessagesEnum = {}));
|
|
15902
|
+
|
|
15690
15903
|
/**
|
|
15691
15904
|
* Enum list of all possible account setup items. Using with [ACCOUNT_SETUP_ITEMS]{@link ACCOUNT_SETUP_ITEMS}
|
|
15692
15905
|
*/
|
|
@@ -17344,15 +17557,15 @@ function passwordMatchValidator(newPassControlName, confirmPassControlName) {
|
|
|
17344
17557
|
};
|
|
17345
17558
|
}
|
|
17346
17559
|
|
|
17347
|
-
var MessagesEnum$
|
|
17560
|
+
var MessagesEnum$2;
|
|
17348
17561
|
(function (MessagesEnum) {
|
|
17349
17562
|
MessagesEnum["INVALID_DATE"] = "The date should not be before $1";
|
|
17350
|
-
})(MessagesEnum$
|
|
17563
|
+
})(MessagesEnum$2 || (MessagesEnum$2 = {}));
|
|
17351
17564
|
|
|
17352
17565
|
/**
|
|
17353
17566
|
* Validation function, that checks If date form value is more than provided date
|
|
17354
17567
|
*/
|
|
17355
|
-
function minDateValidator(date, message = MessagesEnum$
|
|
17568
|
+
function minDateValidator(date, message = MessagesEnum$2.INVALID_DATE.replace('$1', new DatePipe('en-US').transform(date))) {
|
|
17356
17569
|
return (control) => {
|
|
17357
17570
|
if (!control.value) {
|
|
17358
17571
|
return null;
|
|
@@ -18112,6 +18325,38 @@ class BankLoginForm extends AbstractForm {
|
|
|
18112
18325
|
}
|
|
18113
18326
|
}
|
|
18114
18327
|
|
|
18328
|
+
class AnnualClientDetailsForm extends AbstractForm {
|
|
18329
|
+
constructor(annualClientDetails = plainToClass(AnnualClientDetails, {})) {
|
|
18330
|
+
super({
|
|
18331
|
+
capitalLoss: new UntypedFormControl(annualClientDetails.capitalLoss, Validators.required),
|
|
18332
|
+
privateHealthCare: new UntypedFormControl(annualClientDetails.privateHealthCare, Validators.required),
|
|
18333
|
+
spouse: new UntypedFormControl(annualClientDetails.spouse, Validators.required),
|
|
18334
|
+
spouseAnnualIncome: new UntypedFormControl(annualClientDetails.spouseAnnualIncome, conditionalValidator(() => this.get('spouse').value, Validators.required)),
|
|
18335
|
+
hasDependants: new UntypedFormControl(!!annualClientDetails.spouseAnnualIncome, Validators.required),
|
|
18336
|
+
dependants: new UntypedFormControl(annualClientDetails.dependants, conditionalValidator(() => this.get('hasDependants').value, Validators.required)),
|
|
18337
|
+
hasStudentLoan: new UntypedFormControl(!!annualClientDetails.studentLoanAmount, Validators.required),
|
|
18338
|
+
studentLoanAmount: new UntypedFormControl(annualClientDetails.studentLoanAmount, conditionalValidator(() => this.get('hasStudentLoan').value, Validators.required)),
|
|
18339
|
+
}, annualClientDetails);
|
|
18340
|
+
this.annualClientDetails = annualClientDetails;
|
|
18341
|
+
this.watchFieldForToggle('spouse', 'spouseAnnualIncome');
|
|
18342
|
+
this.watchFieldForToggle('hasDependants', 'dependants');
|
|
18343
|
+
this.watchFieldForToggle('hasStudentLoan', 'studentLoanAmount');
|
|
18344
|
+
this.emitValues();
|
|
18345
|
+
}
|
|
18346
|
+
watchFieldForToggle(field, dependantField) {
|
|
18347
|
+
this.get(field).valueChanges.subscribe((value) => this.toggleField(dependantField, !!value));
|
|
18348
|
+
}
|
|
18349
|
+
toggleField(field, enable) {
|
|
18350
|
+
if (enable) {
|
|
18351
|
+
this.get(field).enable();
|
|
18352
|
+
}
|
|
18353
|
+
else {
|
|
18354
|
+
this.get(field).setValue(0);
|
|
18355
|
+
this.get(field).disable();
|
|
18356
|
+
}
|
|
18357
|
+
}
|
|
18358
|
+
}
|
|
18359
|
+
|
|
18115
18360
|
class ClientIncomeTypesForm extends AbstractForm {
|
|
18116
18361
|
constructor(clientIncomeTypes = plainToClass(ClientIncomeTypes, {})) {
|
|
18117
18362
|
super({
|
|
@@ -18266,22 +18511,18 @@ class PropertySaleCostSaleForm extends AbstractForm {
|
|
|
18266
18511
|
commission: new UntypedFormControl(propertySale.commission || 0, Validators.required),
|
|
18267
18512
|
legalFees: new UntypedFormControl(propertySale.legalFees || 0, Validators.required),
|
|
18268
18513
|
otherCost: new UntypedFormControl(propertySale.otherCost || 0, Validators.required),
|
|
18269
|
-
|
|
18270
|
-
grossCGT: new UntypedFormControl({ value: propertySale.grossCGT, disabled: true }, Validators.required),
|
|
18271
|
-
grossCGTAfterLoss: new UntypedFormControl({ value: propertySale.grossCGTAfterLoss, disabled: true }, Validators.required),
|
|
18514
|
+
grossCapitalGain: new UntypedFormControl({ value: propertySale.grossCapitalGain, disabled: true }, Validators.required),
|
|
18272
18515
|
}, propertySale);
|
|
18273
18516
|
this.propertySale = propertySale;
|
|
18274
18517
|
this.property = property;
|
|
18275
18518
|
this.listenEvents();
|
|
18276
|
-
this.
|
|
18519
|
+
this.updateGrossCapitalGain();
|
|
18277
18520
|
}
|
|
18278
18521
|
listenEvents() {
|
|
18279
18522
|
this.listenCommissionUpdated();
|
|
18280
18523
|
this.listenLegalFeesUpdated();
|
|
18281
18524
|
this.listenOtherCostUpdated();
|
|
18282
18525
|
this.listenPriceUpdated();
|
|
18283
|
-
this.listenCapitalLossUpdated();
|
|
18284
|
-
this.listenGrossCGT();
|
|
18285
18526
|
}
|
|
18286
18527
|
/**
|
|
18287
18528
|
* Get property instance based on provided property and form value to get actual form calculations
|
|
@@ -18291,41 +18532,31 @@ class PropertySaleCostSaleForm extends AbstractForm {
|
|
|
18291
18532
|
return plainToClass(PropertySale, Object.assign({}, this.propertySale, this.getRawValue()));
|
|
18292
18533
|
}
|
|
18293
18534
|
submit(data = {}) {
|
|
18294
|
-
// '
|
|
18295
|
-
Object.assign(data, {
|
|
18535
|
+
// 'grossCapitalGain' field is always disabled, but we need it to submit result
|
|
18536
|
+
Object.assign(data, { grossCapitalGain: this.get('grossCapitalGain').value });
|
|
18296
18537
|
return super.submit(data);
|
|
18297
18538
|
}
|
|
18298
|
-
|
|
18299
|
-
this.get('
|
|
18539
|
+
updateGrossCapitalGain() {
|
|
18540
|
+
this.get('grossCapitalGain').setValue(Math.round(this.property.calculateGrossCapitalGain(this.getPropertySale())).toFixed());
|
|
18300
18541
|
}
|
|
18301
18542
|
listenCommissionUpdated() {
|
|
18302
18543
|
this.get('commission').valueChanges.subscribe(() => {
|
|
18303
|
-
this.
|
|
18544
|
+
this.updateGrossCapitalGain();
|
|
18304
18545
|
});
|
|
18305
18546
|
}
|
|
18306
18547
|
listenLegalFeesUpdated() {
|
|
18307
18548
|
this.get('legalFees').valueChanges.subscribe(() => {
|
|
18308
|
-
this.
|
|
18549
|
+
this.updateGrossCapitalGain();
|
|
18309
18550
|
});
|
|
18310
18551
|
}
|
|
18311
18552
|
listenOtherCostUpdated() {
|
|
18312
18553
|
this.get('otherCost').valueChanges.subscribe(() => {
|
|
18313
|
-
this.
|
|
18554
|
+
this.updateGrossCapitalGain();
|
|
18314
18555
|
});
|
|
18315
18556
|
}
|
|
18316
18557
|
listenPriceUpdated() {
|
|
18317
18558
|
this.get('price').valueChanges.subscribe(() => {
|
|
18318
|
-
this.
|
|
18319
|
-
});
|
|
18320
|
-
}
|
|
18321
|
-
listenCapitalLossUpdated() {
|
|
18322
|
-
this.get('capitalLoss').valueChanges.subscribe(() => {
|
|
18323
|
-
this.updateGrossCGT();
|
|
18324
|
-
});
|
|
18325
|
-
}
|
|
18326
|
-
listenGrossCGT() {
|
|
18327
|
-
this.get('grossCGT').valueChanges.subscribe((grossCGT) => {
|
|
18328
|
-
this.get('grossCGTAfterLoss').setValue(this.getPropertySale().grossCGTAfterLoss);
|
|
18559
|
+
this.updateGrossCapitalGain();
|
|
18329
18560
|
});
|
|
18330
18561
|
}
|
|
18331
18562
|
}
|
|
@@ -18338,7 +18569,8 @@ class PropertySaleExemptionsForm extends AbstractForm {
|
|
|
18338
18569
|
super({
|
|
18339
18570
|
taxExemption: new UntypedFormControl(taxExemptions.findBy('id', propertySale.taxExemption?.id ?? property.getCGTExemption(propertySale))),
|
|
18340
18571
|
taxExemptionMetaFields: new UntypedFormArray([]),
|
|
18341
|
-
|
|
18572
|
+
grossCapitalGain: new UntypedFormControl(propertySale.grossCapitalGain),
|
|
18573
|
+
netCapitalGain: new UntypedFormControl(propertySale.netCapitalGain),
|
|
18342
18574
|
}, propertySale);
|
|
18343
18575
|
this.propertySale = propertySale;
|
|
18344
18576
|
this.property = property;
|
|
@@ -18346,7 +18578,7 @@ class PropertySaleExemptionsForm extends AbstractForm {
|
|
|
18346
18578
|
if (propertySale.taxExemption) {
|
|
18347
18579
|
this.setFormMetaFieldsControls();
|
|
18348
18580
|
}
|
|
18349
|
-
this.
|
|
18581
|
+
this.updateCapitalGains();
|
|
18350
18582
|
this.listenEvents();
|
|
18351
18583
|
}
|
|
18352
18584
|
listenEvents() {
|
|
@@ -18358,12 +18590,19 @@ class PropertySaleExemptionsForm extends AbstractForm {
|
|
|
18358
18590
|
getPropertySale() {
|
|
18359
18591
|
return plainToClass(PropertySale, Object.assign({}, this.propertySale, this.getRawValue()));
|
|
18360
18592
|
}
|
|
18361
|
-
|
|
18362
|
-
this.
|
|
18593
|
+
updateCapitalGains() {
|
|
18594
|
+
this.updateGrossCapitalGain();
|
|
18595
|
+
this.updateNetCapitalGain();
|
|
18596
|
+
}
|
|
18597
|
+
updateNetCapitalGain() {
|
|
18598
|
+
this.get('netCapitalGain').setValue(this.property.calculateNetCapitalGain(this.getPropertySale()));
|
|
18599
|
+
}
|
|
18600
|
+
updateGrossCapitalGain() {
|
|
18601
|
+
this.get('grossCapitalGain').setValue(this.property.calculateGrossCapitalGain(this.getPropertySale()));
|
|
18363
18602
|
}
|
|
18364
18603
|
listenTaxExemptionUpdated() {
|
|
18365
18604
|
this.get('taxExemption').valueChanges.subscribe((taxExemption) => {
|
|
18366
|
-
this.
|
|
18605
|
+
this.updateCapitalGains();
|
|
18367
18606
|
this.setFormMetaFieldsControls(taxExemption);
|
|
18368
18607
|
});
|
|
18369
18608
|
}
|
|
@@ -18378,6 +18617,9 @@ class PropertySaleExemptionsForm extends AbstractForm {
|
|
|
18378
18617
|
const formArray = this.get('taxExemptionMetaFields');
|
|
18379
18618
|
// clean up
|
|
18380
18619
|
formArray.clear();
|
|
18620
|
+
if (!currentTaxExemption) {
|
|
18621
|
+
return;
|
|
18622
|
+
}
|
|
18381
18623
|
// show all tax exemption meta fields
|
|
18382
18624
|
currentTaxExemption.metaFields.forEach((metaField) => {
|
|
18383
18625
|
// use property sale tax exemption meta field value if it exists
|
|
@@ -18593,6 +18835,9 @@ class MyTaxBusinessIncomeOrLossesForm extends AbstractForm {
|
|
|
18593
18835
|
}
|
|
18594
18836
|
}
|
|
18595
18837
|
|
|
18838
|
+
/**
|
|
18839
|
+
* @TODO vik/nicole test
|
|
18840
|
+
*/
|
|
18596
18841
|
class MyTaxCgtForm extends AbstractForm {
|
|
18597
18842
|
constructor(gainsOrLosses) {
|
|
18598
18843
|
super({
|
|
@@ -19470,10 +19715,10 @@ class TransactionBaseForm extends AbstractForm {
|
|
|
19470
19715
|
}
|
|
19471
19716
|
}
|
|
19472
19717
|
|
|
19473
|
-
var MessagesEnum;
|
|
19718
|
+
var MessagesEnum$1;
|
|
19474
19719
|
(function (MessagesEnum) {
|
|
19475
19720
|
MessagesEnum["DATE_VALIDATION_ERROR"] = "The transaction date is before the ownership date, please update the date to confirm";
|
|
19476
|
-
})(MessagesEnum || (MessagesEnum = {}));
|
|
19721
|
+
})(MessagesEnum$1 || (MessagesEnum$1 = {}));
|
|
19477
19722
|
|
|
19478
19723
|
class TransactionForm extends TransactionBaseForm {
|
|
19479
19724
|
constructor(transaction, registeredForGst, allocations, controls = {}) {
|
|
@@ -19488,7 +19733,7 @@ class TransactionForm extends TransactionBaseForm {
|
|
|
19488
19733
|
});
|
|
19489
19734
|
// forbid to add transactions before property ownership
|
|
19490
19735
|
if (transaction.property) {
|
|
19491
|
-
this.get('date').addValidators(minDateValidator(transaction.property.myShare.fromDate, MessagesEnum.DATE_VALIDATION_ERROR));
|
|
19736
|
+
this.get('date').addValidators(minDateValidator(transaction.property.myShare.fromDate, MessagesEnum$1.DATE_VALIDATION_ERROR));
|
|
19492
19737
|
}
|
|
19493
19738
|
// property income usually comes with fees, add empty control for new transactions
|
|
19494
19739
|
if (!transaction.id && transaction.property && !transaction.transactions.length && transaction.isCredit()) {
|
|
@@ -19743,11 +19988,91 @@ class DepreciationForm extends TransactionBaseForm {
|
|
|
19743
19988
|
}
|
|
19744
19989
|
}
|
|
19745
19990
|
|
|
19991
|
+
class HoldingSaleForm extends AbstractForm {
|
|
19992
|
+
constructor(sale, holding, type) {
|
|
19993
|
+
super({
|
|
19994
|
+
quantity: new UntypedFormControl(sale.quantity, [Validators.required, Validators.max(holding.currentQuantity)]),
|
|
19995
|
+
price: new UntypedFormControl(sale.price || type.price, Validators.required),
|
|
19996
|
+
fee: new UntypedFormControl(sale.fee, Validators.required),
|
|
19997
|
+
date: new UntypedFormControl(sale.date, Validators.required),
|
|
19998
|
+
grossCapitalGain: new UntypedFormControl({ value: sale.grossCapitalGain, disabled: true }),
|
|
19999
|
+
netCapitalGain: new UntypedFormControl({ value: sale.netCapitalGain, disabled: true }),
|
|
20000
|
+
file: new UntypedFormControl(sale.file)
|
|
20001
|
+
}, sale);
|
|
20002
|
+
this.holding = holding;
|
|
20003
|
+
if (sale.id) {
|
|
20004
|
+
this.emitValues();
|
|
20005
|
+
}
|
|
20006
|
+
this.listenEvents();
|
|
20007
|
+
}
|
|
20008
|
+
listenEvents() {
|
|
20009
|
+
this.listenQuantityChanges();
|
|
20010
|
+
this.listenPriceChanges();
|
|
20011
|
+
}
|
|
20012
|
+
listenQuantityChanges() {
|
|
20013
|
+
this.get('quantity').valueChanges.subscribe(() => {
|
|
20014
|
+
this.updateGainFields();
|
|
20015
|
+
});
|
|
20016
|
+
}
|
|
20017
|
+
listenPriceChanges() {
|
|
20018
|
+
this.get('price').valueChanges.subscribe(() => {
|
|
20019
|
+
this.updateGainFields();
|
|
20020
|
+
});
|
|
20021
|
+
}
|
|
20022
|
+
updateGainFields() {
|
|
20023
|
+
this.get('grossCapitalGain').setValue(this.currentValue.getCapitalGain(this.holding));
|
|
20024
|
+
this.get('netCapitalGain').setValue(this.currentValue.getNetCapitalGain(this.holding));
|
|
20025
|
+
}
|
|
20026
|
+
}
|
|
20027
|
+
|
|
20028
|
+
class HoldingTypeForm extends AbstractForm {
|
|
20029
|
+
constructor(holdingType = plainToClass(HoldingType, {})) {
|
|
20030
|
+
super({
|
|
20031
|
+
category: new UntypedFormControl(holdingType.category, Validators.required),
|
|
20032
|
+
name: new UntypedFormControl(holdingType.name, Validators.required),
|
|
20033
|
+
description: new UntypedFormControl(holdingType.description, Validators.required),
|
|
20034
|
+
price: new UntypedFormControl(holdingType.price, [Validators.required, Validators.min(0)]),
|
|
20035
|
+
dividendPercent: new UntypedFormControl(holdingType.dividendPercent, Validators.min(0))
|
|
20036
|
+
}, holdingType);
|
|
20037
|
+
}
|
|
20038
|
+
}
|
|
20039
|
+
|
|
20040
|
+
class HoldingForm extends AbstractForm {
|
|
20041
|
+
constructor(holding) {
|
|
20042
|
+
super({
|
|
20043
|
+
isTaxFree: new UntypedFormControl(holding.isTaxFree, Validators.required),
|
|
20044
|
+
quantity: new UntypedFormControl(holding.quantity, [Validators.required, Validators.min(0)]),
|
|
20045
|
+
price: new UntypedFormControl(holding.price, [Validators.required, Validators.min(0)]),
|
|
20046
|
+
fee: new UntypedFormControl(holding.fee, [Validators.required, Validators.min(0)]),
|
|
20047
|
+
date: new UntypedFormControl(holding.date, Validators.required),
|
|
20048
|
+
type: new UntypedFormControl(holding.type, Validators.required),
|
|
20049
|
+
ownershipPercent: new UntypedFormControl(holding.ownershipPercent || 100, Validators.required),
|
|
20050
|
+
file: new UntypedFormControl(holding.file)
|
|
20051
|
+
}, holding);
|
|
20052
|
+
}
|
|
20053
|
+
}
|
|
20054
|
+
|
|
20055
|
+
var MessagesEnum;
|
|
20056
|
+
(function (MessagesEnum) {
|
|
20057
|
+
MessagesEnum["HOLDING_CREATED"] = "Holding created";
|
|
20058
|
+
MessagesEnum["HOLDING_UPDATED"] = "Holding updated";
|
|
20059
|
+
MessagesEnum["HOLDING_CONFIRM_DELETE"] = "Are you sure you want to delete this holding?";
|
|
20060
|
+
MessagesEnum["HOLDING_DELETED"] = "Holding deleted";
|
|
20061
|
+
MessagesEnum["HOLDING_SALE_CREATED"] = "Holding sale created";
|
|
20062
|
+
MessagesEnum["HOLDING_SALE_UPDATED"] = "Holding sale updated";
|
|
20063
|
+
MessagesEnum["HOLDING_SALE_CONFIRM_DELETE"] = "Are you sure you want to delete this holding sale?";
|
|
20064
|
+
MessagesEnum["HOLDING_SALE_DELETED"] = "Holding sale deleted";
|
|
20065
|
+
MessagesEnum["HOLDING_TYPE_CREATED"] = "Holding type created";
|
|
20066
|
+
MessagesEnum["HOLDING_TYPE_UPDATED"] = "Holding type updated";
|
|
20067
|
+
MessagesEnum["HOLDING_TYPE_CONFIRM_DELETE"] = "Are you sure you want to delete this holding type?";
|
|
20068
|
+
MessagesEnum["HOLDING_TYPE_DELETED"] = "Holding type deleted";
|
|
20069
|
+
})(MessagesEnum || (MessagesEnum = {}));
|
|
20070
|
+
|
|
19746
20071
|
// @TODO Alex: Create indexes everywhere and break this file to imports from indexes
|
|
19747
20072
|
|
|
19748
20073
|
/**
|
|
19749
20074
|
* Generated bundle index. Do not edit.
|
|
19750
20075
|
*/
|
|
19751
20076
|
|
|
19752
|
-
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualFrequencyEnum, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqService, BasiqToken, BasiqTokenService, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, Firm, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingSale, HoldingSaleService, HoldingService, HoldingType, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, ReceiptService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, StripePromoCode, SubscriptionItemCollection, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReceipt, TransactionReceiptService, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
20077
|
+
export { AbstractForm, AbstractModel, AccountSetupItem, AccountSetupItemCollection, AccountSetupService, Address, AddressForm, AddressService, AddressTypeEnum, AllocationGroup, AllocationGroupCollection, AllocationRule, AllocationRuleCollection, AllocationRuleConditionComparisonOperatorEnum, AllocationRuleConditionFieldEnum, AllocationRuleConditionOperatorEnum, AllocationRuleForm, AllocationRuleService, AllocationRuleTransaction, AllocationRuleTransactionMetaField, AllocationRuleTypeEnum, AlphabetColorsEnum, AnnualClientDetails, AnnualClientDetailsForm, AnnualClientDetailsService, AnnualFrequencyEnum, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetTypeEnum, AssetsService, AuthService, BANK_ACCOUNT_TYPES, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankLoginData, BankLoginForm, BankService, BankTransaction, BankTransactionCalculationService, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqService, BasiqToken, BasiqTokenService, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsSalaryIncludedListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartData, ChartSerie, Chat, ChatCollection, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientDetails, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientIncomeTypes, ClientIncomeTypesForm, ClientIncomeTypesService, ClientInvite, ClientInviteCollection, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CorelogicService, CorelogicSuggestion, Country, DEDUCTION_CATEGORIES, DEPRECIATION_GROUPS, DOCUMENT_FILE_TYPES, DeductionClothingTypeEnum, DeductionSelfEducationTypeEnum, Depreciation, DepreciationCalculationEnum, DepreciationCalculationPercentEnum, DepreciationCapitalProject, DepreciationCapitalProjectService, DepreciationCollection, DepreciationForecast, DepreciationForecastCollection, DepreciationForm, DepreciationGroup, DepreciationGroupEnum, DepreciationGroupItem, DepreciationLvpAssetTypeEnum, DepreciationLvpRateEnum, DepreciationLvpReportItem, DepreciationLvpReportItemCollection, DepreciationReceipt, DepreciationReceiptService, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderService, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeInvite, EmployeeInviteService, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, Firm, FirmService, FirmTypeEnum, FormValidationsEnum, GoogleService, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingMessagesEnum, HoldingSale, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, InterceptorsModule, IntercomService, InviteStatusEnum, JsPdf, JwtService, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanMaxNumberOfPaymentsEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, LogbookBestPeriodService, LogbookPeriod, LoginForm, LossTypeEnum, MODULE_URL_LIST, MONTHS, Message, MessageCollection, MessageDocument, MessageDocumentCollection, MessageDocumentService, MessageService, MessagesEnum, MonthNameShortEnum, MonthNumberEnum, MyAccountHistory, MyAccountHistoryInitiatedByEnum, MyAccountHistoryStatusEnum, MyAccountHistoryTypeEnum, MyTaxBusinessDetails, MyTaxBusinessDetailsForm, MyTaxBusinessIncome, MyTaxBusinessIncomeForm, MyTaxBusinessIncomeOrLossesForm, MyTaxBusinessLosses, MyTaxBusinessLossesForm, MyTaxCgt, MyTaxCgtForm, MyTaxDeductions, MyTaxDeductionsForm, MyTaxDividends, MyTaxDividendsForm, MyTaxEstimate, MyTaxIncomeStatements, MyTaxIncomeStatementsForm, MyTaxIncomeTests, MyTaxIncomeTestsForm, MyTaxInterest, MyTaxInterestForm, MyTaxLosses, MyTaxLossesForm, MyTaxMedicareForm, MyTaxOffsets, MyTaxOffsetsForm, MyTaxOtherIncome, MyTaxOtherIncomeForm, MyTaxPartnershipsAndTrusts, MyTaxPartnershipsAndTrustsForm, MyTaxRent, MyTaxRentForm, Notification, Occupation, OccupationService, PASSWORD_REGEXPS, PasswordForm, PdfFromDataTableService, PdfFromDomElementService, PdfFromHtmlTableService, PdfFromTableService, PdfOrientationEnum, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, Property, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentService, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, ReceiptService, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestService$1 as RestService, RewardfulService, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, ShareFilterOptionsEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessLossesCollection, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, StripePromoCode, SubscriptionItemCollection, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReview, TaxReviewCollection, TaxReviewHistoryService, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseForm, TransactionCalculationService, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReceipt, TransactionReceiptService, TransactionService, TransactionSourceEnum, TransactionTypeEnum, TtCoreModule, TutorialVideoService, USER_ROLES, USER_WORK_POSITION, User, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserInviteForm, UserMedicareExemptionEnum, UserRolesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, minDateValidator, passwordMatchValidator, passwordValidator, replace, roundTo, sort, sortDeep, taxReviewFilterPredicate, toArray };
|
|
19753
20078
|
//# sourceMappingURL=taxtank-core.mjs.map
|