taxtank-core 0.33.8 → 0.33.9
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/holding/holding.collection.mjs +8 -1
- package/esm2022/src/lib/db/Models/bank/bank-account.mjs +1 -1
- package/fesm2022/taxtank-core.mjs +7 -0
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/holding/holding.collection.d.ts +1 -0
- package/src/lib/db/Models/bank/bank-account.d.ts +1 -0
@@ -58,6 +58,13 @@ export class HoldingCollection extends ExportableCollection {
|
|
58
58
|
get marketValue() {
|
59
59
|
return this.sumBy('marketValue');
|
60
60
|
}
|
61
|
+
get sharedMarketValue() {
|
62
|
+
let sharedMarketValue = 0;
|
63
|
+
this.items.forEach(holding => {
|
64
|
+
sharedMarketValue += holding.ownershipPercent / 100 * holding.marketValue;
|
65
|
+
});
|
66
|
+
return sharedMarketValue;
|
67
|
+
}
|
61
68
|
getGrowthCoefficient() {
|
62
69
|
return this.marketValue / this.getPurchaseValue() - 1;
|
63
70
|
}
|
@@ -65,4 +72,4 @@ export class HoldingCollection extends ExportableCollection {
|
|
65
72
|
return this.removeBy('currentQuantity', 0);
|
66
73
|
}
|
67
74
|
}
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy5jb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2NvbGxlY3Rpb25zL2hvbGRpbmcvaG9sZGluZy5jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwwQkFBMEIsQ0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], BankAccount.prototype, "currentBalance", void 0);
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFuay1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2RiL01vZGVscy9iYW5rL2JhbmstYWNjb3VudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBT0EsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3RELE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUV6QyxNQUFNLE9BQU8sV0FBWSxTQUFRLGVBQWU7YUFDdkMsY0FBUyxHQUFHLGFBQWEsQ0FBQzs7QUFTakM7SUFEQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMsTUFBTSxDQUFDO21EQUNLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQmFua0FjY291bnRTdGF0dXNFbnVtLCBCYW5rQWNjb3VudFR5cGVFbnVtIH0gZnJvbSAnLi4vLi4vRW51bXMnO1xuaW1wb3J0IHsgQmFua0Nvbm5lY3Rpb24gfSBmcm9tICcuL2JhbmstY29ubmVjdGlvbic7XG5pbXBvcnQgeyBCYW5rQWNjb3VudFByb3BlcnR5IH0gZnJvbSAnLi9iYW5rLWFjY291bnQtcHJvcGVydHknO1xuaW1wb3J0IHsgQmFua1RyYW5zYWN0aW9uIH0gZnJvbSAnLi9iYW5rLXRyYW5zYWN0aW9uJztcbmltcG9ydCB7IEJhbmtBY2NvdW50QmFsYW5jZSB9IGZyb20gJy4vYmFuay1hY2NvdW50LWJhbGFuY2UnO1xuaW1wb3J0IHsgTG9hbiB9IGZyb20gJy4uL2xvYW4vbG9hbic7XG5pbXBvcnQgeyBTb2xlQnVzaW5lc3NBbGxvY2F0aW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QmFsYW5jZT86IG51bWJlcjtcblxuICBjbG9zZUJhbGFuY2U/OiBudW1iZXI7XG4gIGN1cnJlbmN5Pzogc3RyaW5nO1xuICBtaWdyYXRlRnJvbT86IERhdGU7XG4gIG1pZ3JhdGVUbz86IERhdGU7XG4gIGxhc3RUcmFuc2FjdGlvbkRhdGU/OiBEYXRlO1xuICBiYWxhbmNlSW5pdERhdGU/OiBEYXRlO1xuICBkZWxldGVkQXQ/OiBEYXRlO1xuICBjcmVhdGVkQXQ/OiBEYXRlO1xuICB1cGRhdGVkQXQ/OiBEYXRlO1xuICBiYW5rQ29ubmVjdGlvbj86IEJhbmtDb25uZWN0aW9uO1xuICBiYW5rQWNjb3VudFByb3BlcnRpZXM/OiBCYW5rQWNjb3VudFByb3BlcnR5W107XG4gIGJ1c2luZXNzQWxsb2NhdGlvbnM/OiBTb2xlQnVzaW5lc3NBbGxvY2F0aW9uW107XG4gIGJhbmtUcmFuc2FjdGlvbnM/OiBCYW5rVHJhbnNhY3Rpb25bXTtcbiAgYmFsYW5jZXM/OiBCYW5rQWNjb3VudEJhbGFuY2VbXTtcbiAgbG9hbj86IExvYW47XG59XG4iXX0=
|
@@ -9462,6 +9462,13 @@ class HoldingCollection extends ExportableCollection {
|
|
9462
9462
|
get marketValue() {
|
9463
9463
|
return this.sumBy('marketValue');
|
9464
9464
|
}
|
9465
|
+
get sharedMarketValue() {
|
9466
|
+
let sharedMarketValue = 0;
|
9467
|
+
this.items.forEach(holding => {
|
9468
|
+
sharedMarketValue += holding.ownershipPercent / 100 * holding.marketValue;
|
9469
|
+
});
|
9470
|
+
return sharedMarketValue;
|
9471
|
+
}
|
9465
9472
|
getGrowthCoefficient() {
|
9466
9473
|
return this.marketValue / this.getPurchaseValue() - 1;
|
9467
9474
|
}
|