taxtank-core 0.33.60 → 0.33.62
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/esm2022/src/lib/collections/asset-sale.collection.mjs +4 -1
- package/esm2022/src/lib/collections/collection-dictionary.mjs +10 -1
- package/esm2022/src/lib/collections/collection.mjs +1 -1
- package/esm2022/src/lib/collections/holding/holding-sale.collection.mjs +3 -3
- package/esm2022/src/lib/collections/holding/holding-trade.collection.mjs +81 -0
- package/esm2022/src/lib/collections/holding/holding.collection.mjs +19 -54
- package/esm2022/src/lib/collections/holding/index.mjs +3 -2
- package/esm2022/src/lib/db/Enums/holding/holding-trade-type.enum.mjs +6 -0
- package/esm2022/src/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
- package/esm2022/src/lib/db/Enums/holding/index.mjs +2 -1
- package/esm2022/src/lib/db/Models/holding/holding-sale.mjs +1 -1
- package/esm2022/src/lib/db/Models/holding/holding-trade-import.mjs +3 -0
- package/esm2022/src/lib/db/Models/holding/holding-trade.mjs +3 -0
- package/esm2022/src/lib/db/Models/holding/index.mjs +2 -2
- package/esm2022/src/lib/forms/abstract.form.mjs +6 -1
- package/esm2022/src/lib/forms/holding/holding-reinvest.form.mjs +14 -14
- package/esm2022/src/lib/forms/holding/holding-sale.form.mjs +3 -2
- package/esm2022/src/lib/forms/holding/holding-trade/holding-trade-filter.form.mjs +28 -0
- package/esm2022/src/lib/forms/holding/holding-trade/holding-trade.form.mjs +29 -0
- package/esm2022/src/lib/forms/holding/holding-trade/index.mjs +3 -0
- package/esm2022/src/lib/forms/holding/holding-trade-import.form.mjs +25 -0
- package/esm2022/src/lib/forms/holding/index.mjs +3 -3
- package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +9 -9
- package/esm2022/src/lib/models/holding/holding-reinvest.mjs +4 -4
- package/esm2022/src/lib/models/holding/holding-sale.mjs +10 -1
- package/esm2022/src/lib/models/holding/holding-trade-import.mjs +16 -0
- package/esm2022/src/lib/models/holding/holding-trade.mjs +62 -0
- package/esm2022/src/lib/models/holding/holding-type-exchange.mjs +4 -1
- package/esm2022/src/lib/models/holding/holding-type.mjs +4 -1
- package/esm2022/src/lib/models/holding/holding.mjs +43 -71
- package/esm2022/src/lib/models/holding/index.mjs +4 -3
- package/esm2022/src/lib/services/account-setup/account-setup.service.mjs +3 -3
- package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import-messages.enum.mjs +9 -0
- package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.mjs +37 -0
- package/esm2022/src/lib/services/http/holding/holding-trade-messages.enum.mjs +10 -0
- package/esm2022/src/lib/services/http/holding/holding-trade.service.mjs +44 -0
- package/esm2022/src/lib/services/http/holding/index.mjs +5 -6
- package/esm2022/src/lib/validators/match-sum.validator.mjs +2 -2
- package/fesm2022/taxtank-core.mjs +332 -198
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/asset-sale.collection.d.ts +3 -0
- package/src/lib/collections/collection-dictionary.d.ts +1 -0
- package/src/lib/collections/holding/holding-sale.collection.d.ts +4 -4
- package/src/lib/collections/holding/holding-trade.collection.d.ts +22 -0
- package/src/lib/collections/holding/holding.collection.d.ts +7 -10
- package/src/lib/collections/holding/index.d.ts +2 -1
- package/src/lib/db/Enums/holding/holding-trade-type.enum.d.ts +4 -0
- package/src/lib/db/Enums/holding/index.d.ts +1 -0
- package/src/lib/db/Models/holding/holding-sale.d.ts +2 -2
- package/src/lib/db/Models/holding/holding-trade-import.d.ts +8 -0
- package/src/lib/db/Models/holding/{holding.d.ts → holding-trade.d.ts} +1 -1
- package/src/lib/db/Models/holding/index.d.ts +1 -1
- package/src/lib/forms/abstract.form.d.ts +2 -0
- package/src/lib/forms/holding/holding-reinvest.form.d.ts +5 -5
- package/src/lib/forms/holding/holding-sale.form.d.ts +2 -2
- package/src/lib/forms/holding/holding-trade/holding-trade-filter.form.d.ts +9 -0
- package/src/lib/forms/holding/holding-trade/holding-trade.form.d.ts +9 -0
- package/src/lib/forms/holding/holding-trade/index.d.ts +2 -0
- package/src/lib/forms/holding/holding-trade-import.form.d.ts +8 -0
- package/src/lib/forms/holding/index.d.ts +2 -2
- package/src/lib/models/holding/holding-reinvest.d.ts +2 -2
- package/src/lib/models/holding/holding-sale.d.ts +16 -4
- package/src/lib/models/holding/holding-trade-import.d.ts +8 -0
- package/src/lib/models/holding/holding-trade.d.ts +37 -0
- package/src/lib/models/holding/holding-type-exchange.d.ts +3 -0
- package/src/lib/models/holding/holding-type.d.ts +3 -0
- package/src/lib/models/holding/holding.d.ts +19 -34
- package/src/lib/models/holding/index.d.ts +3 -2
- package/src/lib/services/account-setup/account-setup.service.d.ts +2 -2
- package/src/lib/services/http/holding/{holding-import/holding-import-messages.enum.d.ts → holding-trade-import/holding-trade-import-messages.enum.d.ts} +1 -1
- package/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.d.ts +17 -0
- package/src/lib/services/http/holding/{holding-messages.enum.d.ts → holding-trade-messages.enum.d.ts} +1 -1
- package/src/lib/services/http/holding/holding-trade.service.d.ts +20 -0
- package/src/lib/services/http/holding/index.d.ts +4 -5
- package/esm2022/src/lib/db/Models/holding/holding-import.mjs +0 -3
- package/esm2022/src/lib/db/Models/holding/holding.mjs +0 -3
- package/esm2022/src/lib/forms/holding/holding-import.form.mjs +0 -25
- package/esm2022/src/lib/forms/holding/holding.form.mjs +0 -28
- package/esm2022/src/lib/models/holding/holding-import.mjs +0 -16
- package/esm2022/src/lib/services/http/holding/holding-import/holding-import-messages.enum.mjs +0 -9
- package/esm2022/src/lib/services/http/holding/holding-import/holding-import.service.mjs +0 -37
- package/esm2022/src/lib/services/http/holding/holding-messages.enum.mjs +0 -10
- package/esm2022/src/lib/services/http/holding/holding-sale-messages.enum.mjs +0 -8
- package/esm2022/src/lib/services/http/holding/holding.service.mjs +0 -44
- package/src/lib/db/Models/holding/holding-import.d.ts +0 -8
- package/src/lib/forms/holding/holding-import.form.d.ts +0 -8
- package/src/lib/forms/holding/holding.form.d.ts +0 -8
- package/src/lib/models/holding/holding-import.d.ts +0 -8
- package/src/lib/services/http/holding/holding-import/holding-import.service.d.ts +0 -17
- package/src/lib/services/http/holding/holding-sale-messages.enum.d.ts +0 -6
- package/src/lib/services/http/holding/holding.service.d.ts +0 -20
@@ -636,7 +636,7 @@ class ServiceNotification extends AbstractModel {
|
|
636
636
|
class TaxCalculation extends AbstractModel {
|
637
637
|
}
|
638
638
|
|
639
|
-
let
|
639
|
+
let HoldingTrade$1 = class HoldingTrade {
|
640
640
|
};
|
641
641
|
|
642
642
|
let HoldingType$1 = class HoldingType {
|
@@ -1259,6 +1259,12 @@ var HoldingTypeExchangeListEnum;
|
|
1259
1259
|
HoldingTypeExchangeListEnum[HoldingTypeExchangeListEnum["CC"] = 7] = "CC";
|
1260
1260
|
})(HoldingTypeExchangeListEnum || (HoldingTypeExchangeListEnum = {}));
|
1261
1261
|
|
1262
|
+
var HoldingTradeTypeEnum;
|
1263
|
+
(function (HoldingTradeTypeEnum) {
|
1264
|
+
HoldingTradeTypeEnum[HoldingTradeTypeEnum["BUY"] = 1] = "BUY";
|
1265
|
+
HoldingTradeTypeEnum[HoldingTradeTypeEnum["SELL"] = 2] = "SELL";
|
1266
|
+
})(HoldingTradeTypeEnum || (HoldingTradeTypeEnum = {}));
|
1267
|
+
|
1262
1268
|
var TaxReturnCategoryListEnum;
|
1263
1269
|
(function (TaxReturnCategoryListEnum) {
|
1264
1270
|
TaxReturnCategoryListEnum[TaxReturnCategoryListEnum["SALARY"] = 1] = "SALARY";
|
@@ -1790,6 +1796,15 @@ class CollectionDictionary {
|
|
1790
1796
|
this.items[key] = this.createCollection(obj[key]);
|
1791
1797
|
});
|
1792
1798
|
}
|
1799
|
+
filter(callback) {
|
1800
|
+
const collectionDictionary = new CollectionDictionary(this.createCollection());
|
1801
|
+
for (const key in this.items) {
|
1802
|
+
if (callback(this.get(key))) {
|
1803
|
+
collectionDictionary.add(key, this.get(key));
|
1804
|
+
}
|
1805
|
+
}
|
1806
|
+
return collectionDictionary;
|
1807
|
+
}
|
1793
1808
|
}
|
1794
1809
|
|
1795
1810
|
/**
|
@@ -9383,7 +9398,7 @@ class UserEventTypeCollection extends Collection {
|
|
9383
9398
|
}
|
9384
9399
|
}
|
9385
9400
|
|
9386
|
-
class
|
9401
|
+
class HoldingTradeCollection extends ExportableCollection {
|
9387
9402
|
getExportHeader() {
|
9388
9403
|
return ['Date', 'Ticker', 'Name', 'Asset type', 'Qty bought', 'Qty current', 'Buy price/Unit', 'Current price/Unit', 'Total MV', 'Profit/Loss'];
|
9389
9404
|
}
|
@@ -9395,17 +9410,17 @@ class HoldingCollection extends ExportableCollection {
|
|
9395
9410
|
getExportBody() {
|
9396
9411
|
return this.items.map((holding) => [
|
9397
9412
|
plainToClass(ExportCell, { value: holding.date, type: ExportCellTypeEnum.DATE }),
|
9398
|
-
plainToClass(ExportCell, { value: holding.
|
9413
|
+
plainToClass(ExportCell, { value: holding.holdingType.ticker, type: ExportCellTypeEnum.STRING }),
|
9399
9414
|
plainToClass(ExportCell, {
|
9400
|
-
value: holding.
|
9415
|
+
value: holding.holdingType.name,
|
9401
9416
|
type: ExportCellTypeEnum.STRING
|
9402
9417
|
}),
|
9403
|
-
plainToClass(ExportCell, { value: holding.
|
9418
|
+
plainToClass(ExportCell, { value: holding.holdingType.categoryLabel, type: ExportCellTypeEnum.STRING }),
|
9404
9419
|
plainToClass(ExportCell, { value: holding.quantity, type: ExportCellTypeEnum.STRING }),
|
9405
|
-
plainToClass(ExportCell, { value: holding.currentQuantity, type: ExportCellTypeEnum.STRING }),
|
9420
|
+
// plainToClass(ExportCell, { value: holding.currentQuantity, type: ExportCellTypeEnum.STRING }),
|
9406
9421
|
plainToClass(ExportCell, { value: holding.price, type: ExportCellTypeEnum.CURRENCY }),
|
9407
9422
|
plainToClass(ExportCell, {
|
9408
|
-
value: holding.
|
9423
|
+
value: holding.holdingType.price,
|
9409
9424
|
type: ExportCellTypeEnum.CURRENCY
|
9410
9425
|
}),
|
9411
9426
|
plainToClass(ExportCell, {
|
@@ -9418,42 +9433,45 @@ class HoldingCollection extends ExportableCollection {
|
|
9418
9433
|
}),
|
9419
9434
|
]);
|
9420
9435
|
}
|
9436
|
+
getPurchases() {
|
9437
|
+
return this.filterBy('type', HoldingTradeTypeEnum.BUY);
|
9438
|
+
}
|
9439
|
+
getSales() {
|
9440
|
+
return this.filterBy('type', HoldingTradeTypeEnum.SELL);
|
9441
|
+
}
|
9442
|
+
getPosition() {
|
9443
|
+
return this.getPurchases().sumBy('quantity') - this.getSales().sumBy('quantity');
|
9444
|
+
}
|
9421
9445
|
getShares() {
|
9422
|
-
return this.filterBy('
|
9446
|
+
return this.filterBy('holdingType.category', HoldingTypeCategoryEnum.STOCK);
|
9423
9447
|
}
|
9424
9448
|
getCryptos() {
|
9425
|
-
return this.filterBy('
|
9449
|
+
return this.filterBy('holdingType.category', HoldingTypeCategoryEnum.CRYPTO);
|
9426
9450
|
}
|
9427
9451
|
getOthers() {
|
9428
|
-
return this.filterBy('
|
9452
|
+
return this.filterBy('holdingType.category', [
|
9429
9453
|
HoldingTypeCategoryEnum.COLLECTIBLE,
|
9430
9454
|
HoldingTypeCategoryEnum.UNLISTED_STOCK,
|
9431
9455
|
HoldingTypeCategoryEnum.UNLISTED_UNIT,
|
9432
9456
|
HoldingTypeCategoryEnum.OTHER
|
9433
9457
|
]);
|
9434
9458
|
}
|
9435
|
-
|
9436
|
-
|
9437
|
-
|
9459
|
+
/**
|
9460
|
+
* @TODO vik remove, use holding.marketValue instead
|
9461
|
+
*/
|
9438
9462
|
get marketValue() {
|
9439
9463
|
return this.sumBy('marketValue');
|
9440
9464
|
}
|
9465
|
+
/**
|
9466
|
+
* @TODO vik remove, use holding.sharedMarketValue instead
|
9467
|
+
*/
|
9441
9468
|
get sharedMarketValue() {
|
9442
9469
|
let sharedMarketValue = 0;
|
9443
|
-
this.items.forEach(
|
9444
|
-
sharedMarketValue +=
|
9470
|
+
this.items.forEach(trade => {
|
9471
|
+
sharedMarketValue += trade.ownershipPercent / 100 * trade.marketValue;
|
9445
9472
|
});
|
9446
9473
|
return sharedMarketValue;
|
9447
9474
|
}
|
9448
|
-
getGrowthCoefficient() {
|
9449
|
-
return this.marketValue / this.getPurchaseValue() - 1;
|
9450
|
-
}
|
9451
|
-
getUnsold() {
|
9452
|
-
return this.removeBy('currentQuantity', 0);
|
9453
|
-
}
|
9454
|
-
getUnrealisedProfit() {
|
9455
|
-
return this.marketValue - this.getPurchaseValue();
|
9456
|
-
}
|
9457
9475
|
}
|
9458
9476
|
|
9459
9477
|
class HoldingSaleCollection extends ExportableCollection {
|
@@ -9471,11 +9489,11 @@ class HoldingSaleCollection extends ExportableCollection {
|
|
9471
9489
|
getExportBody(holdingsById) {
|
9472
9490
|
return this.items.map((sale) => [
|
9473
9491
|
plainToClass(ExportCell, {
|
9474
|
-
value: holdingsById.get(sale.holding.id).
|
9492
|
+
value: holdingsById.get(sale.holding.id).holdingType.ticker || '',
|
9475
9493
|
type: ExportCellTypeEnum.STRING
|
9476
9494
|
}),
|
9477
9495
|
plainToClass(ExportCell, {
|
9478
|
-
value: holdingsById.get(sale.holding.id).
|
9496
|
+
value: holdingsById.get(sale.holding.id).holdingType.categoryLabel,
|
9479
9497
|
type: ExportCellTypeEnum.STRING
|
9480
9498
|
}),
|
9481
9499
|
plainToClass(ExportCell, { value: holdingsById.get(sale.holding.id)?.date, type: ExportCellTypeEnum.DATE }),
|
@@ -9504,6 +9522,46 @@ class HoldingTypeCollection extends Collection {
|
|
9504
9522
|
}
|
9505
9523
|
}
|
9506
9524
|
|
9525
|
+
class HoldingCollection extends Collection {
|
9526
|
+
static fromTrades(trades, holdingTypes) {
|
9527
|
+
const holdingTypesById = holdingTypes.indexBy('id');
|
9528
|
+
const tradesByHoldingType = trades.groupBy('holdingType.id');
|
9529
|
+
const items = [];
|
9530
|
+
for (const key in tradesByHoldingType.items) {
|
9531
|
+
if (tradesByHoldingType.get(key).getPosition() > 0) {
|
9532
|
+
items.push(new Holding(tradesByHoldingType.get(key), holdingTypesById.get(key)));
|
9533
|
+
}
|
9534
|
+
}
|
9535
|
+
return new HoldingCollection(items);
|
9536
|
+
}
|
9537
|
+
getShares() {
|
9538
|
+
return this.filterBy('type.category', HoldingTypeCategoryEnum.STOCK);
|
9539
|
+
}
|
9540
|
+
getCryptos() {
|
9541
|
+
return this.filterBy('type.category', HoldingTypeCategoryEnum.CRYPTO);
|
9542
|
+
}
|
9543
|
+
getOthers() {
|
9544
|
+
return this.filterBy('type.category', [
|
9545
|
+
HoldingTypeCategoryEnum.COLLECTIBLE,
|
9546
|
+
HoldingTypeCategoryEnum.UNLISTED_STOCK,
|
9547
|
+
HoldingTypeCategoryEnum.UNLISTED_UNIT,
|
9548
|
+
HoldingTypeCategoryEnum.OTHER
|
9549
|
+
]);
|
9550
|
+
}
|
9551
|
+
get marketValue() {
|
9552
|
+
return this.sumBy('marketValue');
|
9553
|
+
}
|
9554
|
+
get purchaseValue() {
|
9555
|
+
return this.sumBy('purchaseValue');
|
9556
|
+
}
|
9557
|
+
getGrowthCoefficient() {
|
9558
|
+
return this.marketValue / this.purchaseValue - 1;
|
9559
|
+
}
|
9560
|
+
getPnl() {
|
9561
|
+
return this.marketValue - this.purchaseValue;
|
9562
|
+
}
|
9563
|
+
}
|
9564
|
+
|
9507
9565
|
class AssetSaleCollection extends Collection {
|
9508
9566
|
get grossCapitalProfit() {
|
9509
9567
|
return this.filter((sale) => sale.grossCapitalGain > 0)
|
@@ -9512,6 +9570,9 @@ class AssetSaleCollection extends Collection {
|
|
9512
9570
|
get fullExemptionSales() {
|
9513
9571
|
return this.filter((sale) => sale.grossCapitalGain != 0 && sale.netCapitalGain == 0);
|
9514
9572
|
}
|
9573
|
+
/**
|
9574
|
+
* true only for isTaxFree=true
|
9575
|
+
*/
|
9515
9576
|
get fullExemptionGrossCapitalProfit() {
|
9516
9577
|
return this.filter((sale) => sale.grossCapitalGain > 0 && sale.netCapitalGain == 0).grossCapitalProfit;
|
9517
9578
|
}
|
@@ -10431,6 +10492,9 @@ const DOCUMENT_FILE_TYPES = {
|
|
10431
10492
|
]
|
10432
10493
|
};
|
10433
10494
|
|
10495
|
+
/**
|
10496
|
+
* @TODO rename 4521 to HoldingExchange when backend ready
|
10497
|
+
*/
|
10434
10498
|
class HoldingTypeExchange extends AbstractModel {
|
10435
10499
|
}
|
10436
10500
|
__decorate([
|
@@ -10440,6 +10504,9 @@ __decorate([
|
|
10440
10504
|
Type(() => HoldingType)
|
10441
10505
|
], HoldingTypeExchange.prototype, "holdingTypes", void 0);
|
10442
10506
|
|
10507
|
+
/**
|
10508
|
+
* @TODO vik 4521 rename to Holding when backend ready
|
10509
|
+
*/
|
10443
10510
|
class HoldingType extends AbstractModel {
|
10444
10511
|
/**
|
10445
10512
|
* @TODO Alex move to translation file
|
@@ -10497,110 +10564,101 @@ __decorate([
|
|
10497
10564
|
Type(() => HoldingTypeExchange)
|
10498
10565
|
], HoldingType.prototype, "exchange", void 0);
|
10499
10566
|
|
10500
|
-
class
|
10501
|
-
/**
|
10502
|
-
* netCapitalGain is different from grossCapitalGain only when 1 year rule applied
|
10503
|
-
*/
|
10504
|
-
isOneYearExemptionApplicable() {
|
10505
|
-
return this.grossCapitalGain !== this.netCapitalGain;
|
10506
|
-
}
|
10507
|
-
get concession() {
|
10508
|
-
return this.isOneYearExemptionApplicable() ? '50% (1 year rule)' : 'None';
|
10509
|
-
}
|
10510
|
-
getCostBase(holding) {
|
10511
|
-
return this.getPurchasePrice(holding) + holding.fee;
|
10512
|
-
}
|
10513
|
-
/**
|
10514
|
-
* Purchase price of sold items
|
10515
|
-
*/
|
10516
|
-
getPurchasePrice(holding) {
|
10517
|
-
return holding.price * this.quantity;
|
10518
|
-
}
|
10519
|
-
get netCost() {
|
10520
|
-
return this.cost - this.fee;
|
10521
|
-
}
|
10522
|
-
get cost() {
|
10523
|
-
return this.price * this.quantity;
|
10524
|
-
}
|
10525
|
-
}
|
10526
|
-
__decorate([
|
10527
|
-
Transform(({ value }) => ({ id: value.id }), { toPlainOnly: true })
|
10528
|
-
], HoldingSale.prototype, "holding", void 0);
|
10529
|
-
__decorate([
|
10530
|
-
Type(() => AppFile)
|
10531
|
-
], HoldingSale.prototype, "file", void 0);
|
10532
|
-
|
10533
|
-
class Holding extends AbstractModel {
|
10567
|
+
class HoldingTrade extends AbstractModel {
|
10534
10568
|
constructor() {
|
10535
10569
|
super(...arguments);
|
10536
10570
|
this.isTaxFree = false;
|
10571
|
+
this.quantity = 0;
|
10572
|
+
this.price = 0;
|
10573
|
+
this.type = HoldingTradeTypeEnum.BUY;
|
10574
|
+
}
|
10575
|
+
isPurchase() {
|
10576
|
+
return this.type === HoldingTradeTypeEnum.BUY;
|
10577
|
+
}
|
10578
|
+
get typeLabel() {
|
10579
|
+
return this.isPurchase() ? 'Buy' : 'Sell';
|
10580
|
+
}
|
10581
|
+
get sign() {
|
10582
|
+
return this.isPurchase() ? '' : '-';
|
10537
10583
|
}
|
10538
10584
|
/**
|
10539
10585
|
* Get total purchasing price
|
10540
10586
|
*/
|
10541
|
-
get
|
10542
|
-
|
10543
|
-
// Price and entity may be empty when we use HoldingForm.currentValue
|
10544
|
-
if (!this.price || !this.quantity) {
|
10545
|
-
return 0;
|
10546
|
-
}
|
10547
|
-
return this.price * quantity;
|
10587
|
+
get total() {
|
10588
|
+
return this.price * this.quantity;
|
10548
10589
|
}
|
10549
10590
|
/**
|
10550
|
-
*
|
10591
|
+
* @TODO vik remove
|
10551
10592
|
*/
|
10552
10593
|
get marketValue() {
|
10553
|
-
return this.
|
10594
|
+
return this.quantity * this.holdingType.price;
|
10554
10595
|
}
|
10555
10596
|
/**
|
10556
10597
|
* Get percent difference between current and buy price
|
10557
10598
|
* @TODO vik/alex no need to pass holdingType, should come from backend
|
10558
10599
|
*/
|
10559
10600
|
get growthCoefficient() {
|
10560
|
-
return this.
|
10601
|
+
return this.holdingType.price / this.price - 1;
|
10561
10602
|
}
|
10562
10603
|
heldMoreYear() {
|
10563
10604
|
const yearTime = 1000 * 60 * 60 * 24 * 365;
|
10564
10605
|
return (new FinancialYear().startDate.getTime() - this.date.getTime()) > yearTime;
|
10565
10606
|
}
|
10566
|
-
isSold() {
|
10567
|
-
return this.currentQuantity === 0;
|
10568
|
-
}
|
10569
10607
|
}
|
10570
10608
|
__decorate([
|
10571
10609
|
Type(() => Date)
|
10572
|
-
],
|
10610
|
+
], HoldingTrade.prototype, "date", void 0);
|
10573
10611
|
__decorate([
|
10574
10612
|
Type(() => User)
|
10575
|
-
],
|
10613
|
+
], HoldingTrade.prototype, "user", void 0);
|
10576
10614
|
__decorate([
|
10577
10615
|
Type(() => HoldingType)
|
10578
|
-
],
|
10616
|
+
], HoldingTrade.prototype, "holdingType", void 0);
|
10579
10617
|
__decorate([
|
10580
10618
|
Type(() => AppFile)
|
10581
|
-
],
|
10619
|
+
], HoldingTrade.prototype, "file", void 0);
|
10620
|
+
|
10621
|
+
/**
|
10622
|
+
* @TODO vik rename to HoldingTradeParcel when backend ready
|
10623
|
+
*/
|
10624
|
+
class HoldingSale extends AssetSale {
|
10625
|
+
/**
|
10626
|
+
* netCapitalGain is different from grossCapitalGain only when 1 year rule applied
|
10627
|
+
*/
|
10628
|
+
isOneYearExemptionApplicable() {
|
10629
|
+
return this.grossCapitalGain !== this.netCapitalGain;
|
10630
|
+
}
|
10631
|
+
get concession() {
|
10632
|
+
return this.isOneYearExemptionApplicable() ? '50% (1 year rule)' : 'None';
|
10633
|
+
}
|
10634
|
+
getCostBase(holding) {
|
10635
|
+
return this.getPurchasePrice(holding) + holding.fee;
|
10636
|
+
}
|
10637
|
+
/**
|
10638
|
+
* Purchase price of sold items
|
10639
|
+
*/
|
10640
|
+
getPurchasePrice(holding) {
|
10641
|
+
return holding.price * this.quantity;
|
10642
|
+
}
|
10643
|
+
/**
|
10644
|
+
* total price of sale
|
10645
|
+
*/
|
10646
|
+
get netCost() {
|
10647
|
+
return this.cost - this.fee;
|
10648
|
+
}
|
10649
|
+
/**
|
10650
|
+
* total price of sale without fee
|
10651
|
+
*/
|
10652
|
+
get cost() {
|
10653
|
+
return this.price * this.quantity;
|
10654
|
+
}
|
10655
|
+
}
|
10582
10656
|
__decorate([
|
10583
|
-
|
10584
|
-
|
10585
|
-
], Holding.prototype, "sales", void 0);
|
10657
|
+
Transform(({ value }) => ({ id: value.id }), { toPlainOnly: true })
|
10658
|
+
], HoldingSale.prototype, "holding", void 0);
|
10586
10659
|
__decorate([
|
10587
|
-
|
10588
|
-
|
10589
|
-
if (type) {
|
10590
|
-
return type.isOther() ? null : type.category;
|
10591
|
-
}
|
10592
|
-
if (obj.category) {
|
10593
|
-
return [
|
10594
|
-
HoldingTypeCategoryEnum.COLLECTIBLE,
|
10595
|
-
HoldingTypeCategoryEnum.UNLISTED_STOCK,
|
10596
|
-
HoldingTypeCategoryEnum.UNLISTED_UNIT,
|
10597
|
-
HoldingTypeCategoryEnum.OTHER
|
10598
|
-
].includes(obj.category) ? null : obj.category;
|
10599
|
-
}
|
10600
|
-
return HoldingTypeCategoryEnum.STOCK;
|
10601
|
-
}, { toClassOnly: true }),
|
10602
|
-
Expose({ toClassOnly: true })
|
10603
|
-
], Holding.prototype, "category", void 0);
|
10660
|
+
Type(() => AppFile)
|
10661
|
+
], HoldingSale.prototype, "file", void 0);
|
10604
10662
|
|
10605
10663
|
/**
|
10606
10664
|
* Helper class for holding reinvest functionality.
|
@@ -10612,24 +10670,77 @@ __decorate([
|
|
10612
10670
|
Type(() => Transaction)
|
10613
10671
|
], HoldingReinvest.prototype, "transaction", void 0);
|
10614
10672
|
__decorate([
|
10615
|
-
Type(() =>
|
10616
|
-
], HoldingReinvest.prototype, "
|
10673
|
+
Type(() => HoldingTrade)
|
10674
|
+
], HoldingReinvest.prototype, "trade", void 0);
|
10617
10675
|
__decorate([
|
10618
10676
|
Type(() => HoldingType)
|
10619
10677
|
], HoldingReinvest.prototype, "holdingType", void 0);
|
10620
10678
|
|
10621
|
-
class
|
10622
|
-
static { this.className = '
|
10679
|
+
class HoldingTradeImport extends ObservableModel {
|
10680
|
+
static { this.className = 'HoldingTradeImport'; }
|
10623
10681
|
}
|
10624
10682
|
__decorate([
|
10625
10683
|
Type(() => Date)
|
10626
|
-
],
|
10684
|
+
], HoldingTradeImport.prototype, "createdAt", void 0);
|
10627
10685
|
__decorate([
|
10628
10686
|
Type(() => Date)
|
10629
|
-
],
|
10687
|
+
], HoldingTradeImport.prototype, "updatedAt", void 0);
|
10630
10688
|
__decorate([
|
10631
|
-
Type(() =>
|
10632
|
-
],
|
10689
|
+
Type(() => HoldingTrade$1)
|
10690
|
+
], HoldingTradeImport.prototype, "holdings", void 0);
|
10691
|
+
|
10692
|
+
class Holding extends AbstractModel {
|
10693
|
+
constructor(trades, type) {
|
10694
|
+
super();
|
10695
|
+
this.trades = trades;
|
10696
|
+
this.type = type;
|
10697
|
+
this.name = type.name;
|
10698
|
+
this.ticker = type.ticker;
|
10699
|
+
this.quantity = trades.getPosition();
|
10700
|
+
this.purchaseValue = this.getPurchaseValue();
|
10701
|
+
this.marketValue = this.getMarketValue();
|
10702
|
+
this.avgPrice = this.getAvgPrice();
|
10703
|
+
this.pnl = this.getPnl();
|
10704
|
+
}
|
10705
|
+
getPurchaseValue() {
|
10706
|
+
let remainingQuantity = this.quantity;
|
10707
|
+
let totalCost = 0;
|
10708
|
+
this.trades.getPurchases().items.forEach(trade => {
|
10709
|
+
if (remainingQuantity <= 0) {
|
10710
|
+
return;
|
10711
|
+
}
|
10712
|
+
const applicableQuantity = Math.min(trade.quantity, remainingQuantity);
|
10713
|
+
totalCost += applicableQuantity * trade.price + trade.fee;
|
10714
|
+
remainingQuantity -= applicableQuantity;
|
10715
|
+
});
|
10716
|
+
return totalCost;
|
10717
|
+
}
|
10718
|
+
getMarketValue() {
|
10719
|
+
return this.quantity * this.type.price;
|
10720
|
+
}
|
10721
|
+
getAvgPrice() {
|
10722
|
+
return this.purchaseValue / this.quantity;
|
10723
|
+
}
|
10724
|
+
/**
|
10725
|
+
* profit and loss
|
10726
|
+
*/
|
10727
|
+
getPnl() {
|
10728
|
+
return this.marketValue - this.purchaseValue;
|
10729
|
+
}
|
10730
|
+
getSharedMarketValue() {
|
10731
|
+
let sharedMarketValue = 0;
|
10732
|
+
this.trades.items.forEach(holding => {
|
10733
|
+
sharedMarketValue += holding.ownershipPercent / 100 * holding.marketValue;
|
10734
|
+
});
|
10735
|
+
return sharedMarketValue;
|
10736
|
+
}
|
10737
|
+
getGrowthCoefficient() {
|
10738
|
+
return this.marketValue / this.purchaseValue - 1;
|
10739
|
+
}
|
10740
|
+
getUnrealisedProfit() {
|
10741
|
+
return this.marketValue - this.purchaseValue;
|
10742
|
+
}
|
10743
|
+
}
|
10633
10744
|
|
10634
10745
|
class BudgetRule extends BudgetRule$1 {
|
10635
10746
|
}
|
@@ -16219,13 +16330,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
16219
16330
|
args: ['environment']
|
16220
16331
|
}] }] });
|
16221
16332
|
|
16222
|
-
class
|
16333
|
+
class HoldingTradeService extends RestService$1 {
|
16223
16334
|
constructor(environment) {
|
16224
16335
|
super(environment);
|
16225
16336
|
this.environment = environment;
|
16226
|
-
this.modelClass =
|
16227
|
-
this.collectionClass =
|
16228
|
-
this.endpointUri = '
|
16337
|
+
this.modelClass = HoldingTrade;
|
16338
|
+
this.collectionClass = HoldingTradeCollection;
|
16339
|
+
this.endpointUri = 'holding-trades';
|
16229
16340
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
16230
16341
|
this.roles = [UserRolesEnum.HOLDING_TANK];
|
16231
16342
|
this.listenEvents();
|
@@ -16233,7 +16344,7 @@ class HoldingService extends RestService$1 {
|
|
16233
16344
|
}
|
16234
16345
|
listenEvents() {
|
16235
16346
|
this.listenCSE(HoldingSale, this.refreshCache, ['post', 'put', 'delete']);
|
16236
|
-
this.listenCSE(
|
16347
|
+
this.listenCSE(HoldingTradeImport, this.refreshCache, ['post', 'put', 'delete']);
|
16237
16348
|
}
|
16238
16349
|
listenNotifications() {
|
16239
16350
|
this.eventDispatcherService.on(AppEventTypeEnum.NOTIFICATION_ADDED).subscribe((notification) => {
|
@@ -16242,10 +16353,10 @@ class HoldingService extends RestService$1 {
|
|
16242
16353
|
}
|
16243
16354
|
});
|
16244
16355
|
}
|
16245
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16246
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16356
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
16357
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeService, providedIn: 'root' }); }
|
16247
16358
|
}
|
16248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeService, decorators: [{
|
16249
16360
|
type: Injectable,
|
16250
16361
|
args: [{
|
16251
16362
|
providedIn: 'root'
|
@@ -16292,12 +16403,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
16292
16403
|
}]
|
16293
16404
|
}] });
|
16294
16405
|
|
16295
|
-
class
|
16406
|
+
class HoldingTradeImportService extends RestService$1 {
|
16296
16407
|
constructor() {
|
16297
16408
|
super(...arguments);
|
16298
|
-
this.modelClass =
|
16409
|
+
this.modelClass = HoldingTradeImport;
|
16299
16410
|
this.collectionClass = (Collection);
|
16300
|
-
this.endpointUri = 'holding-imports';
|
16411
|
+
this.endpointUri = 'holding-trade-imports';
|
16301
16412
|
this.disabledMethods = ['post', 'postBatch', 'putBatch', 'deleteBatch'];
|
16302
16413
|
this.roles = [UserRolesEnum.HOLDING_TANK];
|
16303
16414
|
}
|
@@ -16307,29 +16418,29 @@ class HoldingImportService extends RestService$1 {
|
|
16307
16418
|
formData.append('exchangeId', exchangeId.toString());
|
16308
16419
|
formData.append('isTaxFree', (isTaxFree ? 1 : 0).toString());
|
16309
16420
|
return this.http.post(this.apiUrl, formData).pipe(map((response) => {
|
16310
|
-
const
|
16311
|
-
this.handleResponse([
|
16312
|
-
return
|
16421
|
+
const holdingTradeImport = this.createModelInstance(response);
|
16422
|
+
this.handleResponse([holdingTradeImport], 'post');
|
16423
|
+
return holdingTradeImport;
|
16313
16424
|
}));
|
16314
16425
|
}
|
16315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16316
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeImportService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
16427
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeImportService, providedIn: 'root' }); }
|
16317
16428
|
}
|
16318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type:
|
16429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingTradeImportService, decorators: [{
|
16319
16430
|
type: Injectable,
|
16320
16431
|
args: [{
|
16321
16432
|
providedIn: 'root'
|
16322
16433
|
}]
|
16323
16434
|
}] });
|
16324
16435
|
|
16325
|
-
var
|
16326
|
-
(function (
|
16327
|
-
|
16328
|
-
|
16329
|
-
|
16330
|
-
|
16331
|
-
|
16332
|
-
})(
|
16436
|
+
var HoldingTradeImportMessagesEnum;
|
16437
|
+
(function (HoldingTradeImportMessagesEnum) {
|
16438
|
+
HoldingTradeImportMessagesEnum["CREATED"] = "Import created successfully";
|
16439
|
+
HoldingTradeImportMessagesEnum["UPDATED"] = "Import updated successfully";
|
16440
|
+
HoldingTradeImportMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this import?";
|
16441
|
+
HoldingTradeImportMessagesEnum["DELETED"] = "Import deleted successfully";
|
16442
|
+
HoldingTradeImportMessagesEnum["DELETE_ERROR"] = "Import including sold assets can not be deleted";
|
16443
|
+
})(HoldingTradeImportMessagesEnum || (HoldingTradeImportMessagesEnum = {}));
|
16333
16444
|
|
16334
16445
|
var HoldingTypeExchanges = [
|
16335
16446
|
{
|
@@ -16428,23 +16539,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
16428
16539
|
}]
|
16429
16540
|
}], ctorParameters: () => [] });
|
16430
16541
|
|
16431
|
-
var
|
16432
|
-
(function (
|
16433
|
-
|
16434
|
-
|
16435
|
-
|
16436
|
-
|
16437
|
-
|
16438
|
-
|
16439
|
-
})(
|
16440
|
-
|
16441
|
-
var HoldingSaleMessagesEnum;
|
16442
|
-
(function (HoldingSaleMessagesEnum) {
|
16443
|
-
HoldingSaleMessagesEnum["CREATED"] = "Holding sold successfully";
|
16444
|
-
HoldingSaleMessagesEnum["UPDATED"] = "Sale updated successfully";
|
16445
|
-
HoldingSaleMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this holding sale?";
|
16446
|
-
HoldingSaleMessagesEnum["DELETED"] = "Sale deleted successfully";
|
16447
|
-
})(HoldingSaleMessagesEnum || (HoldingSaleMessagesEnum = {}));
|
16542
|
+
var HoldingTradeMessagesEnum;
|
16543
|
+
(function (HoldingTradeMessagesEnum) {
|
16544
|
+
HoldingTradeMessagesEnum["CREATED"] = "Holding created successfully";
|
16545
|
+
HoldingTradeMessagesEnum["UPDATED"] = "Holding updated successfully";
|
16546
|
+
HoldingTradeMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this holding?";
|
16547
|
+
HoldingTradeMessagesEnum["DELETED"] = "Holding deleted successfully";
|
16548
|
+
HoldingTradeMessagesEnum["DELETE_ASSET_ERROR"] = "In the \"SOLD\" section click on the \"REDO\" button for the current asset";
|
16549
|
+
HoldingTradeMessagesEnum["REINVESTED"] = "Reinvested successfully";
|
16550
|
+
})(HoldingTradeMessagesEnum || (HoldingTradeMessagesEnum = {}));
|
16448
16551
|
|
16449
16552
|
var HoldingTypeMessagesEnum;
|
16450
16553
|
(function (HoldingTypeMessagesEnum) {
|
@@ -18882,7 +18985,7 @@ class AccountSetupService {
|
|
18882
18985
|
}
|
18883
18986
|
return this.setItemStatus(this.items.findBy('isBankFeeds', true), this.bankAccountsService.getArray());
|
18884
18987
|
}
|
18885
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountSetupService, deps: [{ token: SetupItemService }, { token: PropertyService }, { token: IncomeSourceService }, { token: BankAccountService }, { token: TransactionAllocationService }, { token: VehicleClaimService }, { token: TransactionService }, { token: SoleBusinessService }, { token:
|
18988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountSetupService, deps: [{ token: SetupItemService }, { token: PropertyService }, { token: IncomeSourceService }, { token: BankAccountService }, { token: TransactionAllocationService }, { token: VehicleClaimService }, { token: TransactionService }, { token: SoleBusinessService }, { token: HoldingTradeService }, { token: UserService }, { token: ClientMovementService }, { token: ClientInviteService }, { token: EmployeeService }, { token: EmployeeInviteService }, { token: FirmService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
18886
18989
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountSetupService, providedIn: 'root' }); }
|
18887
18990
|
}
|
18888
18991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccountSetupService, decorators: [{
|
@@ -18890,7 +18993,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
18890
18993
|
args: [{
|
18891
18994
|
providedIn: 'root'
|
18892
18995
|
}]
|
18893
|
-
}], ctorParameters: () => [{ type: SetupItemService }, { type: PropertyService }, { type: IncomeSourceService }, { type: BankAccountService }, { type: TransactionAllocationService }, { type: VehicleClaimService }, { type: TransactionService }, { type: SoleBusinessService }, { type:
|
18996
|
+
}], ctorParameters: () => [{ type: SetupItemService }, { type: PropertyService }, { type: IncomeSourceService }, { type: BankAccountService }, { type: TransactionAllocationService }, { type: VehicleClaimService }, { type: TransactionService }, { type: SoleBusinessService }, { type: HoldingTradeService }, { type: UserService }, { type: ClientMovementService }, { type: ClientInviteService }, { type: EmployeeService }, { type: EmployeeInviteService }, { type: FirmService }] });
|
18894
18997
|
|
18895
18998
|
const KEY = '_switch_user';
|
18896
18999
|
/**
|
@@ -19911,10 +20014,10 @@ const ENDPOINTS = {
|
|
19911
20014
|
LOANS_PAYOUT_DELETE: new Endpoint('DELETE', '\\/loans\\/\\d+\\/payout\\/\\d+'),
|
19912
20015
|
LOANS_CALCULATION_POST: new Endpoint('POST', '\\/bank-accounts\\/loans\\/calculation'),
|
19913
20016
|
LOGIN_POST: new Endpoint('POST', '\\/login'),
|
19914
|
-
|
19915
|
-
|
19916
|
-
|
19917
|
-
|
20017
|
+
HOLDING_TRADE_GET: new Endpoint('GET', '\\/holding-trades'),
|
20018
|
+
HOLDING_TRADE_POST: new Endpoint('POST', '\\/holding-trades'),
|
20019
|
+
HOLDING_TRADE_PUT: new Endpoint('PUT', '\\/holding-trades\\/\\d+'),
|
20020
|
+
HOLDING_TRADE_DELETE: new Endpoint('DELETE', '\\/holding-trades\\/\\d+'),
|
19918
20021
|
HOLDING_TYPES_GET: new Endpoint('GET', '\\/holding-types'),
|
19919
20022
|
HOLDING_TYPES_POST: new Endpoint('POST', '\\/holding-types'),
|
19920
20023
|
HOLDING_TYPES_PUT: new Endpoint('PUT', '\\/holding-types\\/\\d+'),
|
@@ -19923,10 +20026,10 @@ const ENDPOINTS = {
|
|
19923
20026
|
HOLDING_SALES_POST: new Endpoint('POST', '\\/holding-sales'),
|
19924
20027
|
HOLDING_SALES_PUT: new Endpoint('PUT', '\\/holding-sales\\/\\d+'),
|
19925
20028
|
HOLDING_SALES_DELETE: new Endpoint('DELETE', '\\/holding-sales\\/\\d+'),
|
19926
|
-
|
19927
|
-
|
19928
|
-
|
19929
|
-
|
20029
|
+
HOLDING_TRADE_IMPORTS_GET: new Endpoint('GET', '\\/holding-trade-imports'),
|
20030
|
+
HOLDING_TRADE_IMPORTS_POST: new Endpoint('POST', '\\/holding-trade-imports'),
|
20031
|
+
HOLDING_TRADE_IMPORTS_PUT: new Endpoint('PUT', '\\/holding-trade-imports\\/\\d+'),
|
20032
|
+
HOLDING_TRADE_IMPORTS_DELETE: new Endpoint('DELETE', '\\/holding-trade-imports\\/\\d+'),
|
19930
20033
|
NOTIFICATIONS_GET: new Endpoint('GET', '\\/service-notifications'),
|
19931
20034
|
OCCUPATIONS_GET: new Endpoint('GET', '\\/occupations'),
|
19932
20035
|
PROPERTIES_GET: new Endpoint('GET', '\\/properties'),
|
@@ -20873,6 +20976,10 @@ class AbstractForm extends FormGroup {
|
|
20873
20976
|
control.enable(opts);
|
20874
20977
|
});
|
20875
20978
|
}
|
20979
|
+
controlsChanges(controlNames) {
|
20980
|
+
const controls = controlNames.map(controlName => this.get(controlName));
|
20981
|
+
return combineLatest(controls.map(control => control.valueChanges));
|
20982
|
+
}
|
20876
20983
|
}
|
20877
20984
|
|
20878
20985
|
class CollectionForm extends FormArray {
|
@@ -21489,7 +21596,7 @@ function matchSumValidator(controlsFn) {
|
|
21489
21596
|
}
|
21490
21597
|
const sum = controls.reduce((acc, control) => acc + control.value, 0);
|
21491
21598
|
const targetValue = targetControl.value;
|
21492
|
-
return sum === targetValue ? null : { matchSum: true };
|
21599
|
+
return sum.toFixed(2) === targetValue.toFixed(2) ? null : { matchSum: true };
|
21493
21600
|
};
|
21494
21601
|
}
|
21495
21602
|
|
@@ -24353,10 +24460,62 @@ class DepreciationForm extends TransactionBaseForm {
|
|
24353
24460
|
}
|
24354
24461
|
}
|
24355
24462
|
|
24463
|
+
class HoldingTradeForm extends AbstractForm {
|
24464
|
+
constructor(holdingTrade) {
|
24465
|
+
super({
|
24466
|
+
isTaxFree: new UntypedFormControl(holdingTrade.isTaxFree, Validators.required),
|
24467
|
+
type: new UntypedFormControl(holdingTrade.type, Validators.required),
|
24468
|
+
quantity: new UntypedFormControl(holdingTrade.quantity, [Validators.required, greaterThanValidator(0)]),
|
24469
|
+
price: new UntypedFormControl(holdingTrade.price, [Validators.required, Validators.min(0)]),
|
24470
|
+
fee: new UntypedFormControl(holdingTrade.fee, [Validators.required, Validators.min(0)]),
|
24471
|
+
date: new UntypedFormControl(holdingTrade.date, Validators.required),
|
24472
|
+
holdingType: new UntypedFormControl(holdingTrade.holdingType, Validators.required),
|
24473
|
+
ownershipPercent: new UntypedFormControl(holdingTrade.ownershipPercent || 100, Validators.required),
|
24474
|
+
file: new UntypedFormControl(holdingTrade.file)
|
24475
|
+
}, holdingTrade);
|
24476
|
+
this.purchaseValue = 0;
|
24477
|
+
this.listenEvents();
|
24478
|
+
}
|
24479
|
+
listenEvents() {
|
24480
|
+
this.controlsChanges(['quantity', 'price', 'fee']).subscribe(([quantity, price, fee]) => {
|
24481
|
+
this.purchaseValue = quantity * price + fee;
|
24482
|
+
});
|
24483
|
+
}
|
24484
|
+
submit(data = {}, includeDisabledFields = false) {
|
24485
|
+
return super.submit(data, includeDisabledFields);
|
24486
|
+
}
|
24487
|
+
}
|
24488
|
+
|
24489
|
+
class HoldingTradeFilterForm extends AbstractForm {
|
24490
|
+
constructor() {
|
24491
|
+
super({
|
24492
|
+
category: new UntypedFormControl(),
|
24493
|
+
isTaxFree: new UntypedFormControl(''),
|
24494
|
+
});
|
24495
|
+
this.categories = [];
|
24496
|
+
this.get('category').valueChanges.subscribe(category => {
|
24497
|
+
this.categories = category === HoldingTypeCategoryEnum.OTHER
|
24498
|
+
? [HoldingTypeCategoryEnum.OTHER, HoldingTypeCategoryEnum.COLLECTIBLE, HoldingTypeCategoryEnum.UNLISTED_STOCK, HoldingTypeCategoryEnum.UNLISTED_UNIT]
|
24499
|
+
: [category];
|
24500
|
+
});
|
24501
|
+
}
|
24502
|
+
filter(trades) {
|
24503
|
+
let filteredTrades = trades;
|
24504
|
+
if (typeof this.value.isTaxFree == 'boolean') {
|
24505
|
+
filteredTrades = trades.filterBy('isTaxFree', this.value.isTaxFree);
|
24506
|
+
}
|
24507
|
+
if (this.categories.length) {
|
24508
|
+
filteredTrades = filteredTrades.filterBy('holdingType.category', this.categories);
|
24509
|
+
}
|
24510
|
+
return filteredTrades;
|
24511
|
+
}
|
24512
|
+
}
|
24513
|
+
|
24356
24514
|
class HoldingSaleForm extends AbstractForm {
|
24357
24515
|
constructor(sale, holding, type, isResident) {
|
24358
24516
|
super({
|
24359
|
-
|
24517
|
+
// @TODO Validators.max(holding.currentQuantity + sale.quantity)
|
24518
|
+
quantity: new UntypedFormControl(sale.quantity, [Validators.required, greaterThanValidator(0)]),
|
24360
24519
|
price: new UntypedFormControl(sale.price || type.price, Validators.required),
|
24361
24520
|
fee: new UntypedFormControl(sale.fee, Validators.required),
|
24362
24521
|
date: new UntypedFormControl(sale.date, Validators.required),
|
@@ -24412,31 +24571,6 @@ class HoldingTypeForm extends AbstractForm {
|
|
24412
24571
|
}
|
24413
24572
|
}
|
24414
24573
|
|
24415
|
-
class HoldingForm extends AbstractForm {
|
24416
|
-
constructor(holding) {
|
24417
|
-
super({
|
24418
|
-
category: new UntypedFormControl(holding.category),
|
24419
|
-
isTaxFree: new UntypedFormControl(holding.isTaxFree, Validators.required),
|
24420
|
-
quantity: new UntypedFormControl(holding.quantity, [Validators.required, greaterThanValidator(0)]),
|
24421
|
-
price: new UntypedFormControl(holding.price, [Validators.required, Validators.min(0)]),
|
24422
|
-
fee: new UntypedFormControl(holding.fee, [Validators.required, Validators.min(0)]),
|
24423
|
-
date: new UntypedFormControl(holding.date, Validators.required),
|
24424
|
-
type: new UntypedFormControl(holding.type, Validators.required),
|
24425
|
-
ownershipPercent: new UntypedFormControl(holding.ownershipPercent || 100, Validators.required),
|
24426
|
-
file: new UntypedFormControl(holding.file)
|
24427
|
-
}, holding);
|
24428
|
-
this.listenEvents();
|
24429
|
-
}
|
24430
|
-
listenEvents() {
|
24431
|
-
this.get('category').valueChanges.subscribe((category) => {
|
24432
|
-
this.get('type').setValue(null);
|
24433
|
-
});
|
24434
|
-
}
|
24435
|
-
submit(data = {}, includeDisabledFields = false) {
|
24436
|
-
return super.submit(data, includeDisabledFields);
|
24437
|
-
}
|
24438
|
-
}
|
24439
|
-
|
24440
24574
|
/**
|
24441
24575
|
* @TODO vik TT-4048
|
24442
24576
|
*/
|
@@ -24446,7 +24580,7 @@ class HoldingReinvestForm extends AbstractForm {
|
|
24446
24580
|
// the difference between dividends amount and given shares (shares=dividendsAmount/sharePrice)
|
24447
24581
|
cashVariance: new FormControl({ value: 0, disabled: true }, Validators.required),
|
24448
24582
|
transaction: new HoldingIncomeForm(reinvest.transaction, null, []),
|
24449
|
-
|
24583
|
+
trade: new HoldingTradeForm(reinvest.trade)
|
24450
24584
|
}, reinvest);
|
24451
24585
|
this.reinvest = reinvest;
|
24452
24586
|
this.listenEvents();
|
@@ -24461,15 +24595,15 @@ class HoldingReinvestForm extends AbstractForm {
|
|
24461
24595
|
});
|
24462
24596
|
}
|
24463
24597
|
listenEvents() {
|
24464
|
-
this.
|
24598
|
+
this.listenTradeChanges();
|
24465
24599
|
this.listenDateChanges();
|
24466
24600
|
this.listenAmountChanges();
|
24467
24601
|
}
|
24468
24602
|
get transactionForm() {
|
24469
24603
|
return this.get('transaction');
|
24470
24604
|
}
|
24471
|
-
get
|
24472
|
-
return this.get('
|
24605
|
+
get tradeForm() {
|
24606
|
+
return this.get('trade');
|
24473
24607
|
}
|
24474
24608
|
/**
|
24475
24609
|
* calculated automatically as cashVariance=transactionAmount-frankedAmount-unfrankedAmount
|
@@ -24481,11 +24615,11 @@ class HoldingReinvestForm extends AbstractForm {
|
|
24481
24615
|
});
|
24482
24616
|
}
|
24483
24617
|
/**
|
24484
|
-
* Set transaction amount based on
|
24618
|
+
* Set transaction amount based on trade quantity and price
|
24485
24619
|
*/
|
24486
|
-
|
24487
|
-
// we can watch the whole
|
24488
|
-
this.get('
|
24620
|
+
listenTradeChanges() {
|
24621
|
+
// we can watch the whole trade form because we have only 2 fields in the form template
|
24622
|
+
this.get('trade').valueChanges.subscribe((value) => {
|
24489
24623
|
if (!value.quantity || !value.price) {
|
24490
24624
|
this.get(['transaction', 'amount']).setValue(0);
|
24491
24625
|
return;
|
@@ -24494,15 +24628,15 @@ class HoldingReinvestForm extends AbstractForm {
|
|
24494
24628
|
});
|
24495
24629
|
}
|
24496
24630
|
/**
|
24497
|
-
* Set
|
24631
|
+
* Set trade date the same as transaction date
|
24498
24632
|
*/
|
24499
24633
|
listenDateChanges() {
|
24500
24634
|
this.get(['transaction', 'date']).valueChanges.subscribe((date) => {
|
24501
|
-
this.get(['
|
24635
|
+
this.get(['trade', 'date']).setValue(date);
|
24502
24636
|
});
|
24503
24637
|
}
|
24504
24638
|
/**
|
24505
|
-
* @TODO Alex (TT-2847): attach file to both (transaction and
|
24639
|
+
* @TODO Alex (TT-2847): attach file to both (transaction and trade) when files system refactored
|
24506
24640
|
*/
|
24507
24641
|
submit() {
|
24508
24642
|
const value = this.transactionForm.getRawValue();
|
@@ -24512,12 +24646,12 @@ class HoldingReinvestForm extends AbstractForm {
|
|
24512
24646
|
description: `Reinvestment - ${value.incomeSource?.name}`,
|
24513
24647
|
amount: value.amount - this.get('cashVariance').value
|
24514
24648
|
}),
|
24515
|
-
|
24649
|
+
trade: this.tradeForm.submit()
|
24516
24650
|
});
|
24517
24651
|
}
|
24518
24652
|
}
|
24519
24653
|
|
24520
|
-
class
|
24654
|
+
class HoldingTradeImportForm extends AbstractForm {
|
24521
24655
|
constructor() {
|
24522
24656
|
super({
|
24523
24657
|
category: new UntypedFormControl(HoldingTypeCategoryEnum.STOCK, Validators.required),
|
@@ -24732,5 +24866,5 @@ var MessagesEnum;
|
|
24732
24866
|
* Generated bundle index. Do not edit.
|
24733
24867
|
*/
|
24734
24868
|
|
24735
|
-
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, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportMessagesEnum, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessChartAccountsEnum, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalLoss, CapitalLossForm, CapitalLossMessagesEnum, CapitalLossService, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueCollection, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatFilterForm, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientCouponService, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteCollection, ClientInviteForm, ClientInviteMessages, ClientInvitePutForm, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementForm, ClientMovementMessagesEnum, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CollectionForm, CoreModule, CorelogicMessagesEnum, CorelogicService, CorelogicSuggestion, Country, CurrentFirmBranchService, 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, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeDetailsForm, EmployeeInvite, EmployeeInviteCollection, EmployeeInviteForm, EmployeeInviteRoleEnum, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmBranch, FirmBranchForm, FirmBranchMessagesEnum, FirmBranchService, FirmForm, FirmInviteForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GenderEnum, GoogleService, HTTP_ERROR_MESSAGES, HeaderTitleService, Holding, HoldingCollection, HoldingForm, HoldingImport, HoldingImportForm, HoldingImportMessagesEnum, HoldingImportService, HoldingIncomeForm, HoldingMessagesEnum, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleMessagesEnum, HoldingSaleService, HoldingService, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeListEnum, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, HomeOfficeCalculatorForm, HomeOfficeClaim, HomeOfficeClaimCollection, HomeOfficeClaimForm, HomeOfficeClaimMessagesEnum, HomeOfficeClaimMethodEnum, HomeOfficeClaimService, HomeOfficeLog, HomeOfficeLogForm, HomeOfficeLogMessagesEnum, HomeOfficeLogService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, JsPdf, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanMessagesEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, PriorTransactionService, Property, PropertyAddForm, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementForm, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyForecastForm, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareForm, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationCollection, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, REPORTS, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestMessagesEnum, RestService$1 as RestService, SERVICE_PRODUCT_ROLES, SafeUrlPipe, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceListEnum, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossCollection, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStateEnum, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionCollection, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewFilterForm, TaxReviewFilterStatusEnum, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, TimezoneEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReportItem, TransactionReportItemCollection, TransactionService, TransactionSourceEnum, TransactionTypeEnum, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserCollection, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, matchSumValidator, maxDateValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
|
24869
|
+
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, AppCurrencyPipe, AppEvent, AppEvent2, AppEventTypeEnum, AppFile, AssetEntityTypeEnum, AssetSale, AssetSaleCollection, AssetTypeEnum, AssetsService, Badge, BadgeColorEnum, Bank, BankAccount, BankAccountAddManualForm, BankAccountAllocationForm, BankAccountCalculationService, BankAccountChartData, BankAccountCollection, BankAccountImportForm, BankAccountPropertiesForm, BankAccountProperty, BankAccountService, BankAccountStatusEnum, BankAccountTypeEnum, BankAccountsImportForm, BankConnection, BankConnectionMessagesEnum, BankConnectionService, BankConnectionStatusEnum, BankExternalStats, BankPopularEnum, BankProviderEnum, BankService, BankTransaction, BankTransactionChartData, BankTransactionCollection, BankTransactionService, BankTransactionSummaryFieldsEnum, BankTransactionTypeEnum, BasReport, BasReportForm, BasReportMessagesEnum, BasReportService, BasiqConfig, BasiqJob, BasiqJobResponse, BasiqJobStep, BasiqMessagesEnum, BasiqService, BasiqToken, BasiqTokenService, BestVehicleLogbookCollection, BorrowingExpense, BorrowingExpenseLoan, BorrowingExpenseService, BorrowingReport, BorrowingReportForm, BorrowingReportMessagesEnum, BorrowingReportService, Budget, BudgetForm, BudgetMessagesEnum, BudgetRule, BudgetService, BusinessChartAccountsEnum, BusinessTypeEnum, CAPITAL_COSTS_ITEMS, CHART_ACCOUNTS_CATEGORIES, CalculationFormItem, CalculationFormTypeEnum, CapitalLoss, CapitalLossForm, CapitalLossMessagesEnum, CapitalLossService, CgtExemptionAndRolloverCodeEnum, ChartAccounts, ChartAccountsAdjustmentIncludedListEnum, ChartAccountsCategoryECollection, ChartAccountsCategoryEnum, ChartAccountsCollection, ChartAccountsDepreciation, ChartAccountsDepreciationService, ChartAccountsEtpEnum, ChartAccountsForm, ChartAccountsHeading, ChartAccountsHeadingListEnum, ChartAccountsHeadingTaxDeductibleEnum, ChartAccountsHeadingTaxableEnum, ChartAccountsHeadingVehicleListEnum, ChartAccountsHoldingUntaxedIncomeListEnum, ChartAccountsKeepSign, ChartAccountsListEnum, ChartAccountsMessagesEnum, ChartAccountsMetaField, ChartAccountsMetaFieldListEnum, ChartAccountsMetaFieldTypeEnum, ChartAccountsPropertyAdjustmentsListEnum, ChartAccountsSalaryAdjustmentsListEnum, ChartAccountsService, ChartAccountsTaxLabelsEnum, ChartAccountsTypeEnum, ChartAccountsValue, ChartAccountsValueCollection, ChartAccountsValueService, ChartData, ChartSerie, Chat, ChatCollection, ChatFilterForm, ChatService, ChatStatusEnum, ChatViewTypeEnum, ClientCollection, ClientCouponService, ClientDetails, ClientDetailsForm, ClientDetailsMedicareExemptionEnum, ClientDetailsWorkDepreciationCalculationEnum, ClientDetailsWorkingHolidayMakerEnum, ClientInvite, ClientInviteCollection, ClientInviteForm, ClientInviteMessages, ClientInvitePutForm, ClientInviteService, ClientInviteStatusEnum, ClientInviteTypeEnum, ClientMovement, ClientMovementCollection, ClientMovementForm, ClientMovementMessagesEnum, ClientMovementService, ClientPortfolioChartData, ClientPortfolioReport, ClientPortfolioReportCollection, ClientPortfolioReportService, Collection, CollectionDictionary, CollectionForm, CoreModule, CorelogicMessagesEnum, CorelogicService, CorelogicSuggestion, Country, CurrentFirmBranchService, 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, DepreciationReportItem, DepreciationReportItemCollection, DepreciationService, DepreciationTypeEnum, DepreciationWriteOffAmountEnum, Dictionary, Document, DocumentApiUrlPrefixEnum, DocumentFolder, DocumentFolderForm, DocumentFolderMessagesEnum, DocumentFolderService, DocumentForm, DocumentMessagesEnum, DocumentService, DocumentTypeEnum, ENDPOINTS, EmployeeCollection, EmployeeDetails, EmployeeDetailsForm, EmployeeInvite, EmployeeInviteCollection, EmployeeInviteForm, EmployeeInviteRoleEnum, EmployeeInviteService, EmployeeMessagesEnum, EmployeeService, Endpoint, EquityPositionChartService, EventDispatcherService, ExportDataTable, ExportFormatEnum, ExportFormatterService, ExportableCollection, FacebookService, FileService, FileValidator, FinancialYear, FinancialYearService, Firm, FirmBranch, FirmBranchForm, FirmBranchMessagesEnum, FirmBranchService, FirmForm, FirmInviteForm, FirmMessagesEnum, FirmService, FirmTypeEnum, FormValidationsEnum, GenderEnum, GoogleService, HTTP_ERROR_MESSAGES, HeaderTitleService, Holding, HoldingCollection, HoldingIncomeForm, HoldingReinvest, HoldingReinvestForm, HoldingSale, HoldingSaleCollection, HoldingSaleForm, HoldingSaleService, HoldingTrade, HoldingTradeCollection, HoldingTradeFilterForm, HoldingTradeForm, HoldingTradeImport, HoldingTradeImportForm, HoldingTradeImportMessagesEnum, HoldingTradeImportService, HoldingTradeMessagesEnum, HoldingTradeService, HoldingTradeTypeEnum, HoldingType, HoldingTypeCategoryEnum, HoldingTypeCollection, HoldingTypeExchange, HoldingTypeExchangeListEnum, HoldingTypeExchangeService, HoldingTypeForm, HoldingTypeMessagesEnum, HoldingTypeService, HomeOfficeCalculatorForm, HomeOfficeClaim, HomeOfficeClaimCollection, HomeOfficeClaimForm, HomeOfficeClaimMessagesEnum, HomeOfficeClaimMethodEnum, HomeOfficeClaimService, HomeOfficeLog, HomeOfficeLogForm, HomeOfficeLogMessagesEnum, HomeOfficeLogService, IconsFileEnum, IncomeAmountTypeEnum, IncomePosition, IncomeSource, IncomeSourceChartData, IncomeSourceCollection, IncomeSourceForecast, IncomeSourceForecastCollection, IncomeSourceForecastService, IncomeSourceForecastTrustTypeEnum, IncomeSourceMessagesEnum, IncomeSourceService, IncomeSourceType, IncomeSourceTypeEnum, IncomeSourceTypeListHoldingEnum, IncomeSourceTypeListOtherEnum, IncomeSourceTypeListSoleEnum, IncomeSourceTypeListWorkEnum, IncomeSourceTypeService, InterceptorsModule, IntercomService, InviteStatusEnum, InvoicePaymentForm, JsPdf, Loan, LoanBankTypeEnum, LoanCollection, LoanForm, LoanFrequencyEnum, LoanInterestTypeEnum, LoanInterestTypeLabelEnum, LoanMaxNumberOfPaymentsEnum, LoanMessagesEnum, LoanPayment, LoanPaymentCollection, LoanPayout, LoanPayoutTypeEnum, LoanRepaymentFrequencyEnum, LoanRepaymentTypeEnum, LoanRepaymentTypeLabelEnum, LoanService, LoanTypeEnum, LoanVehicleTypeEnum, 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, PdfService, PdfSettings, Phone, PhoneForm, PhoneTypeEnum, PreloaderService, PriorTransactionService, Property, PropertyAddForm, PropertyCalculationService, PropertyCategory, PropertyCategoryListEnum, PropertyCategoryMovement, PropertyCategoryMovementCollection, PropertyCategoryMovementForm, PropertyCategoryMovementService, PropertyCategoryService, PropertyCollection, PropertyDepreciationCalculationEnum, PropertyDocument, PropertyDocumentForm, PropertyDocumentMessagesEnum, PropertyDocumentService, PropertyEditForm, PropertyEquityChartData, PropertyEquityChartItem, PropertyEquityChartTypeEnum, PropertyForecast, PropertyForecastForm, PropertyMessagesEnum, PropertyReportItem, PropertyReportItemCollection, PropertyReportItemDepreciation, PropertyReportItemDepreciationCollection, PropertyReportItemTransaction, PropertyReportItemTransactionCollection, PropertySale, PropertySaleCollection, PropertySaleCostBase, PropertySaleCostBaseForm, PropertySaleCostSaleForm, PropertySaleExemptionsForm, PropertySaleService, PropertySaleTaxExemptionMetaField, PropertySaleTaxExemptionMetaFieldCollection, PropertyService, PropertyShare, PropertyShareAccessEnum, PropertyShareCollection, PropertyShareForm, PropertyShareService, PropertyShareStatusEnum, PropertySubscription, PropertyTransactionReportService, PropertyValuation, PropertyValuationCollection, PropertyValuationForm, PropertyValuationMessages, PropertyValuationService, REPORTS, RegisterClientForm, RegisterFirmForm, RegistrationInvite, RegistrationInviteStatusEnum, ReportItem, ReportItemCollection, ReportItemDetails, ResetPasswordForm, RestMessagesEnum, RestService$1 as RestService, SERVICE_PRODUCT_ROLES, SafeUrlPipe, SalaryForecast, SalaryForecastFrequencyEnum, SalaryForecastService, ServiceNotificationService, ServiceNotificationStatusEnum, ServiceNotificationTypeEnum, ServicePayment, ServicePaymentMethod, ServicePaymentMethodService, ServicePaymentService, ServicePaymentStatusEnum, ServicePrice, ServicePriceCollection, ServicePriceListEnum, ServicePriceRecurringIntervalEnum, ServicePriceService, ServicePriceTypeEnum, ServiceProduct, ServiceProductCollection, ServiceProductIconsEnum, ServiceProductIdEnum, ServiceProductService, ServiceProductStatusEnum, ServicePromoCode, ServiceSubscription, ServiceSubscriptionCollection, ServiceSubscriptionItem, ServiceSubscriptionStatusEnum, SetupItemTypeEnum, SoleBusiness, SoleBusinessActivity, SoleBusinessActivityService, SoleBusinessAllocation, SoleBusinessAllocationsForm, SoleBusinessForm, SoleBusinessLoss, SoleBusinessLossCollection, SoleBusinessLossForm, SoleBusinessLossOffsetRule, SoleBusinessLossOffsetRuleService, SoleBusinessLossReport, SoleBusinessLossService, SoleBusinessMessagesEnum, SoleBusinessService, SoleContact, SoleContactForm, SoleContactService, SoleDepreciationMethod, SoleDepreciationMethodEnum, SoleDepreciationMethodForm, SoleDepreciationMethodService, SoleDetails, SoleDetailsForm, SoleDetailsService, SoleForecast, SoleForecastService, SoleIncomeForm, SoleInvoice, SoleInvoiceCollection, SoleInvoiceForm, SoleInvoiceItem, SoleInvoiceItemCollection, SoleInvoiceItemForm, SoleInvoiceService, SoleInvoiceStateEnum, SoleInvoiceStatusesEnum, SoleInvoiceTaxTypeEnum, SoleInvoiceTemplate, SoleInvoiceTemplateForm, SoleInvoiceTemplateService, SoleInvoiceTemplateTaxTypeEnum, SpareDocumentSpareTypeEnum, SseService, StatesEnum, SubscriptionItemCollection, SubscriptionMessagesEnum, SubscriptionService, TAX_RETURN_CATEGORIES, TYPE_LOAN, TankTypeEnum, TaxCalculationMedicareExemptionEnum, TaxCalculationTypeEnum, TaxExemption, TaxExemptionCollection, TaxExemptionEnum, TaxExemptionMetaField, TaxExemptionMetaFieldEnum, TaxExemptionService, TaxReturn, TaxReturnCategory, TaxReturnCategoryListEnum, TaxReturnCategorySectionEnum, TaxReturnItem, TaxReturnItemEnum, TaxReturnItemService, TaxReview, TaxReviewCollection, TaxReviewFilterForm, TaxReviewFilterStatusEnum, TaxReviewHistoryService, TaxReviewMessagesEnum, TaxReviewService, TaxReviewStatusEnum, TaxSummary, TaxSummaryListEnum, TaxSummarySection, TaxSummarySectionEnum, TaxSummaryService, TaxSummaryTaxSummaryEnum, TaxSummaryTypeEnum, TicketFeedbackEnum, TicketStatusEnum, TicketTypesEnum, TimezoneEnum, Toast, ToastService, ToastTypeEnum, Transaction, TransactionAllocation, TransactionAllocationCollection, TransactionAllocationService, TransactionBase, TransactionBaseCollection, TransactionBaseFilterForm, TransactionBaseForm, TransactionCategoryEnum, TransactionCollection, TransactionForm, TransactionMetaField, TransactionOperationEnum, TransactionReportItem, TransactionReportItemCollection, TransactionService, TransactionSourceEnum, TransactionTypeEnum, USER_ROLES, USER_WORK_POSITION, UniqueEmailValidator, User, UserCollection, UserEventSetting, UserEventSettingCollection, UserEventSettingFieldEnum, UserEventSettingService, UserEventStatusEnum, UserEventType, UserEventTypeCategory, UserEventTypeClientTypeEnum, UserEventTypeCollection, UserEventTypeEmployeeTypeEnum, UserEventTypeFrequencyEnum, UserEventTypeService, UserEventTypeUserTypeEnum, UserForm, UserInviteForm, UserMedicareExemptionEnum, UserMessagesEnum, UserService, UserStatusEnum, UserSwitcherService, UserTitleEnum, UserToRegister, UserWorkDepreciationCalculationEnum, UserWorkingHolidayMakerEnum, UsersInviteService, Vehicle, VehicleClaim, VehicleClaimCollection, VehicleClaimDetails, VehicleClaimDetailsForm, VehicleClaimDetailsMethodEnum, VehicleClaimDetailsService, VehicleClaimForm, VehicleClaimService, VehicleExpense, VehicleExpenseCollection, VehicleForm, VehicleLogbook, VehicleLogbookCollection, VehicleLogbookForm, VehicleLogbookMessages, VehicleLogbookPurposeEnum, VehicleLogbookService, VehicleMessagesEnum, VehicleService, WorkExpenseForm, WorkIncomeForm, XlsxService, YoutubeService, alphaSpaceValidator, atLeastOneCheckedValidator, atoLinks, autocompleteValidator, cloneDeep, compare, compareMatOptions, conditionalValidator, createDate, currentFinYearValidator, displayMatOptions, enumToList, fieldsSumValidator, getDocIcon, greaterThanValidator, matchSumValidator, maxDateValidator, minDateValidator, passwordMatchValidator, passwordValidator, replace, sort, sortDeep, toArray };
|
24736
24870
|
//# sourceMappingURL=taxtank-core.mjs.map
|