taxtank-core 0.33.59 → 0.33.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/esm2022/src/lib/collections/asset-sale.collection.mjs +4 -1
  2. package/esm2022/src/lib/collections/collection-dictionary.mjs +10 -1
  3. package/esm2022/src/lib/collections/collection.mjs +1 -1
  4. package/esm2022/src/lib/collections/holding/holding-sale.collection.mjs +3 -3
  5. package/esm2022/src/lib/collections/holding/holding-trade.collection.mjs +78 -0
  6. package/esm2022/src/lib/collections/holding/holding.collection.mjs +19 -54
  7. package/esm2022/src/lib/collections/holding/index.mjs +3 -2
  8. package/esm2022/src/lib/db/Enums/holding/holding-trade-type.enum.mjs +6 -0
  9. package/esm2022/src/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
  10. package/esm2022/src/lib/db/Enums/holding/index.mjs +2 -1
  11. package/esm2022/src/lib/db/Models/holding/holding-sale.mjs +1 -1
  12. package/esm2022/src/lib/db/Models/holding/holding-trade-import.mjs +3 -0
  13. package/esm2022/src/lib/db/Models/holding/holding-trade.mjs +3 -0
  14. package/esm2022/src/lib/db/Models/holding/index.mjs +2 -2
  15. package/esm2022/src/lib/forms/abstract.form.mjs +12 -2
  16. package/esm2022/src/lib/forms/bank/bank-account/bank-account-properties.form.mjs +3 -4
  17. package/esm2022/src/lib/forms/holding/holding-reinvest.form.mjs +14 -14
  18. package/esm2022/src/lib/forms/holding/holding-sale.form.mjs +3 -2
  19. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade-filter.form.mjs +25 -0
  20. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade.form.mjs +30 -0
  21. package/esm2022/src/lib/forms/holding/holding-trade/index.mjs +3 -0
  22. package/esm2022/src/lib/forms/holding/holding-trade-import.form.mjs +25 -0
  23. package/esm2022/src/lib/forms/holding/index.mjs +3 -3
  24. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +9 -9
  25. package/esm2022/src/lib/models/holding/holding-reinvest.mjs +4 -4
  26. package/esm2022/src/lib/models/holding/holding-sale.mjs +10 -1
  27. package/esm2022/src/lib/models/holding/holding-trade-import.mjs +16 -0
  28. package/esm2022/src/lib/models/holding/holding-trade.mjs +77 -0
  29. package/esm2022/src/lib/models/holding/holding-type-exchange.mjs +4 -1
  30. package/esm2022/src/lib/models/holding/holding-type.mjs +4 -1
  31. package/esm2022/src/lib/models/holding/holding.mjs +44 -71
  32. package/esm2022/src/lib/models/holding/index.mjs +4 -3
  33. package/esm2022/src/lib/services/account-setup/account-setup.service.mjs +3 -3
  34. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import-messages.enum.mjs +9 -0
  35. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.mjs +37 -0
  36. package/esm2022/src/lib/services/http/holding/holding-trade-messages.enum.mjs +10 -0
  37. package/esm2022/src/lib/services/http/holding/holding-trade.service.mjs +44 -0
  38. package/esm2022/src/lib/services/http/holding/index.mjs +5 -6
  39. package/esm2022/src/lib/services/http/rest/rest.service.mjs +8 -6
  40. package/esm2022/src/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.mjs +5 -3
  41. package/fesm2022/taxtank-core.mjs +347 -193
  42. package/fesm2022/taxtank-core.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/src/lib/collections/asset-sale.collection.d.ts +3 -0
  45. package/src/lib/collections/collection-dictionary.d.ts +1 -0
  46. package/src/lib/collections/holding/holding-sale.collection.d.ts +4 -4
  47. package/src/lib/collections/holding/holding-trade.collection.d.ts +21 -0
  48. package/src/lib/collections/holding/holding.collection.d.ts +7 -10
  49. package/src/lib/collections/holding/index.d.ts +2 -1
  50. package/src/lib/db/Enums/holding/holding-trade-type.enum.d.ts +4 -0
  51. package/src/lib/db/Enums/holding/index.d.ts +1 -0
  52. package/src/lib/db/Models/holding/holding-sale.d.ts +2 -2
  53. package/src/lib/db/Models/holding/holding-trade-import.d.ts +8 -0
  54. package/src/lib/db/Models/holding/{holding.d.ts → holding-trade.d.ts} +1 -1
  55. package/src/lib/db/Models/holding/index.d.ts +1 -1
  56. package/src/lib/forms/abstract.form.d.ts +3 -1
  57. package/src/lib/forms/bank/bank-account/bank-account-properties.form.d.ts +1 -1
  58. package/src/lib/forms/holding/holding-reinvest.form.d.ts +5 -5
  59. package/src/lib/forms/holding/holding-sale.form.d.ts +2 -2
  60. package/src/lib/forms/holding/holding-trade/holding-trade-filter.form.d.ts +9 -0
  61. package/src/lib/forms/holding/holding-trade/holding-trade.form.d.ts +9 -0
  62. package/src/lib/forms/holding/holding-trade/index.d.ts +2 -0
  63. package/src/lib/forms/holding/holding-trade-import.form.d.ts +8 -0
  64. package/src/lib/forms/holding/index.d.ts +2 -2
  65. package/src/lib/models/holding/holding-reinvest.d.ts +2 -2
  66. package/src/lib/models/holding/holding-sale.d.ts +16 -4
  67. package/src/lib/models/holding/holding-trade-import.d.ts +8 -0
  68. package/src/lib/models/holding/holding-trade.d.ts +41 -0
  69. package/src/lib/models/holding/holding-type-exchange.d.ts +3 -0
  70. package/src/lib/models/holding/holding-type.d.ts +3 -0
  71. package/src/lib/models/holding/holding.d.ts +18 -34
  72. package/src/lib/models/holding/index.d.ts +3 -2
  73. package/src/lib/services/account-setup/account-setup.service.d.ts +2 -2
  74. 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
  75. package/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.d.ts +17 -0
  76. package/src/lib/services/http/holding/{holding-messages.enum.d.ts → holding-trade-messages.enum.d.ts} +1 -1
  77. package/src/lib/services/http/holding/holding-trade.service.d.ts +20 -0
  78. package/src/lib/services/http/holding/index.d.ts +4 -5
  79. package/src/lib/services/http/rest/rest.service.d.ts +4 -4
  80. package/src/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.d.ts +1 -3
  81. package/esm2022/src/lib/db/Models/holding/holding-import.mjs +0 -3
  82. package/esm2022/src/lib/db/Models/holding/holding.mjs +0 -3
  83. package/esm2022/src/lib/forms/holding/holding-import.form.mjs +0 -25
  84. package/esm2022/src/lib/forms/holding/holding.form.mjs +0 -28
  85. package/esm2022/src/lib/models/holding/holding-import.mjs +0 -16
  86. package/esm2022/src/lib/services/http/holding/holding-import/holding-import-messages.enum.mjs +0 -9
  87. package/esm2022/src/lib/services/http/holding/holding-import/holding-import.service.mjs +0 -37
  88. package/esm2022/src/lib/services/http/holding/holding-messages.enum.mjs +0 -10
  89. package/esm2022/src/lib/services/http/holding/holding-sale-messages.enum.mjs +0 -8
  90. package/esm2022/src/lib/services/http/holding/holding.service.mjs +0 -44
  91. package/src/lib/db/Models/holding/holding-import.d.ts +0 -8
  92. package/src/lib/forms/holding/holding-import.form.d.ts +0 -8
  93. package/src/lib/forms/holding/holding.form.d.ts +0 -8
  94. package/src/lib/models/holding/holding-import.d.ts +0 -8
  95. package/src/lib/services/http/holding/holding-import/holding-import.service.d.ts +0 -17
  96. package/src/lib/services/http/holding/holding-sale-messages.enum.d.ts +0 -6
  97. package/src/lib/services/http/holding/holding.service.d.ts +0 -20
@@ -7,6 +7,9 @@ export class AssetSaleCollection extends Collection {
7
7
  get fullExemptionSales() {
8
8
  return this.filter((sale) => sale.grossCapitalGain != 0 && sale.netCapitalGain == 0);
9
9
  }
10
+ /**
11
+ * true only for isTaxFree=true
12
+ */
10
13
  get fullExemptionGrossCapitalProfit() {
11
14
  return this.filter((sale) => sale.grossCapitalGain > 0 && sale.netCapitalGain == 0).grossCapitalProfit;
12
15
  }
@@ -53,4 +56,4 @@ export class AssetSaleCollection extends Collection {
53
56
  return noExemptionCapitalGain + cgtDiscount - currentYearCapitalLoss + currentYearCapitalLossApplied;
54
57
  }
55
58
  }
56
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXQtc2FsZS5jb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHM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XBpdGFsTG9zc0FwcGxpZWQsIDApO1xuICAgIGNvbnN0IGhhbGZFeGVtcHRpb25DYXBpdGFsR2FpbiA9IE1hdGgubWF4KHRoaXMuaGFsZkV4ZW1wdGlvbkdyb3NzQ2FwaXRhbFByb2ZpdCAtIChjYXBpdGFsTG9zc0FwcGxpZWQgLSBub0V4ZW1wdGlvbkdyb3NzQ2FwaXRhbFByb2ZpdCksIDApO1xuICAgIGNvbnN0IGNhcGl0YWxHYWluID0gbm9FeGVtcHRpb25DYXBpdGFsR2FpbiArIGhhbGZFeGVtcHRpb25DYXBpdGFsR2FpbjtcbiAgICAvLyBjYXBpdGFsR2FpbiBhZnRlciBleGVtcHRpb25cbiAgICBjb25zdCBjZ3REaXNjb3VudCA9IGhhbGZFeGVtcHRpb25DYXBpdGFsR2FpbiAvIDI7XG5cbiAgICByZXR1cm4gbm9FeGVtcHRpb25DYXBpdGFsR2FpbiArIGNndERpc2NvdW50IC0gY3VycmVudFllYXJDYXBpdGFsTG9zcyArIGN1cnJlbnRZZWFyQ2FwaXRhbExvc3NBcHBsaWVkO1xuICB9XG59XG4iXX0=
@@ -111,5 +111,14 @@ export class CollectionDictionary {
111
111
  this.items[key] = this.createCollection(obj[key]);
112
112
  });
113
113
  }
114
+ filter(callback) {
115
+ const collectionDictionary = new CollectionDictionary(this.createCollection());
116
+ for (const key in this.items) {
117
+ if (callback(this.get(key))) {
118
+ collectionDictionary.add(key, this.get(key));
119
+ }
120
+ }
121
+ return collectionDictionary;
122
+ }
114
123
  }
115
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi1kaWN0aW9uYXJ5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2NvbGxlY3Rpb25zL2NvbGxlY3Rpb24tZGljdGlvbmFyeS50cyJdLCJuYW1lcyI6W10sIm1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uICAgIHJldHVybiBjb2xsZWN0aW9uRGljdGlvbmFyeTtcbiAgfVxufVxuIl19
@@ -171,4 +171,4 @@ export class Collection {
171
171
  return this;
172
172
  }
173
173
  }
174
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9jb2xsZWN0aW9ucy9jb2xsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQy9ELE9BQU8sS0FBSyxNQUFNLGNBQWMsQ0FBQztBQUNqQyxPQUFPLElBQUksTUFBTSxhQUFhLENBQUM7QUFDL0IsT0FBTyxHQUFHLE1BQU0sWUFBWSxDQUFDO0FBQzdCLE9BQU8sRUFBRSxVQUFVLEVBQUUsYUFBYSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQ3RELE9BQU8sT0FBTyxNQUFNLGdCQUFnQixDQUFDO0FBRXJDOztHQUVHO0FBQ0gsTUFBTSxPQUFPLFVBQVU7SUFTckIsWUFBWSxRQUFpQixFQUFFO1FBTC9COztXQUVHO1FBQ0gsVUFBSyxHQUFHLENBQUMsQ0FBQztRQUdSLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO1FBQ25CLHVFQUF1RTtJQUN6RSxDQUFDO0lBRUQ7O09BRUc7SUFDSCxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUM7UUFDZixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUM7SUFDN0IsQ0FBQztJQUVELE1BQU0sQ0FBQyxRQUFpQixFQUFFO1FBQ3hCLE9BQU8sSUFBSyxJQUFJLENBQUMsV0FBbUIsQ0FB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XG5cclxuICBzbGljZShmcm9tOiBudW1iZXIsIHRvOiBudW1iZXIpOiB0aGlzIHtcclxuICAgIHRoaXMuaXRlbXMgPSB0aGlzLml0ZW1zLnNsaWNlKGZyb20sIHRvKTtcclxuXHJcbiAgICByZXR1cm4gdGhpcztcclxuICB9XHJcbn1cclxuIl19
@@ -17,11 +17,11 @@ export class HoldingSaleCollection extends ExportableCollection {
17
17
  getExportBody(holdingsById) {
18
18
  return this.items.map((sale) => [
19
19
  plainToClass(ExportCell, {
20
- value: holdingsById.get(sale.holding.id).type.ticker || '',
20
+ value: holdingsById.get(sale.holding.id).holdingType.ticker || '',
21
21
  type: ExportCellTypeEnum.STRING
22
22
  }),
23
23
  plainToClass(ExportCell, {
24
- value: holdingsById.get(sale.holding.id).type.categoryLabel,
24
+ value: holdingsById.get(sale.holding.id).holdingType.categoryLabel,
25
25
  type: ExportCellTypeEnum.STRING
26
26
  }),
27
27
  plainToClass(ExportCell, { value: holdingsById.get(sale.holding.id)?.date, type: ExportCellTypeEnum.DATE }),
@@ -38,4 +38,4 @@ export class HoldingSaleCollection extends ExportableCollection {
38
38
  ]);
39
39
  }
40
40
  }
41
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1zYWxlLmNvbGxlY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvY29sbGVjdGlvbnMvaG9sZGluZy9ob2xkaW5nLXNhbGUuY29sbGVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNoRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDN0QsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sM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gICAgICBwbGFpblRvQ2xhc3MoRXhwb3J0Q2VsbCwgeyB2YWx1ZTogc2FsZS5ncm9zc0NhcGl0YWxHYWluLCB0eXBlOiBFeHBvcnRDZWxsVHlwZUVudW0uQ1VSUkVOQ1kgfSksXG4gICAgICBwbGFpblRvQ2xhc3MoRXhwb3J0Q2VsbCwge1xuICAgICAgICB2YWx1ZTogc2FsZS5jb25jZXNzaW9uLFxuICAgICAgICB0eXBlOiBFeHBvcnRDZWxsVHlwZUVudW0uU1RSSU5HXG4gICAgICB9KSxcbiAgICBdKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,78 @@
1
+ import { plainToClass } from 'class-transformer';
2
+ import { ExportableCollection } from '../exportable.collection';
3
+ import { ExportCell } from '../../models/export/export-cell';
4
+ import { ExportCellTypeEnum } from '../../models/export/export-cell-type.enum';
5
+ import { HoldingTradeTypeEnum, HoldingTypeCategoryEnum } from '../../db/Enums';
6
+ export class HoldingTradeCollection extends ExportableCollection {
7
+ getExportHeader() {
8
+ return ['Date', 'Ticker', 'Name', 'Asset type', 'Qty bought', 'Qty current', 'Buy price/Unit', 'Current price/Unit', 'Total MV', 'Profit/Loss'];
9
+ }
10
+ getExportFooter() {
11
+ return [
12
+ plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
13
+ ];
14
+ }
15
+ getExportBody() {
16
+ return this.items.map((holding) => [
17
+ plainToClass(ExportCell, { value: holding.date, type: ExportCellTypeEnum.DATE }),
18
+ plainToClass(ExportCell, { value: holding.holdingType.ticker, type: ExportCellTypeEnum.STRING }),
19
+ plainToClass(ExportCell, {
20
+ value: holding.holdingType.name,
21
+ type: ExportCellTypeEnum.STRING
22
+ }),
23
+ plainToClass(ExportCell, { value: holding.holdingType.categoryLabel, type: ExportCellTypeEnum.STRING }),
24
+ plainToClass(ExportCell, { value: holding.quantity, type: ExportCellTypeEnum.STRING }),
25
+ // plainToClass(ExportCell, { value: holding.currentQuantity, type: ExportCellTypeEnum.STRING }),
26
+ plainToClass(ExportCell, { value: holding.price, type: ExportCellTypeEnum.CURRENCY }),
27
+ plainToClass(ExportCell, {
28
+ value: holding.holdingType.price,
29
+ type: ExportCellTypeEnum.CURRENCY
30
+ }),
31
+ plainToClass(ExportCell, {
32
+ value: holding.marketValue,
33
+ type: ExportCellTypeEnum.CURRENCY
34
+ }),
35
+ plainToClass(ExportCell, {
36
+ value: holding.growthCoefficient,
37
+ type: ExportCellTypeEnum.PERCENT
38
+ }),
39
+ ]);
40
+ }
41
+ getPurchases() {
42
+ return this.filterBy('type', HoldingTradeTypeEnum.BUY);
43
+ }
44
+ getSales() {
45
+ return this.filterBy('type', HoldingTradeTypeEnum.SELL);
46
+ }
47
+ getShares() {
48
+ return this.filterBy('holdingType.category', HoldingTypeCategoryEnum.STOCK);
49
+ }
50
+ getCryptos() {
51
+ return this.filterBy('holdingType.category', HoldingTypeCategoryEnum.CRYPTO);
52
+ }
53
+ getOthers() {
54
+ return this.filterBy('holdingType.category', [
55
+ HoldingTypeCategoryEnum.COLLECTIBLE,
56
+ HoldingTypeCategoryEnum.UNLISTED_STOCK,
57
+ HoldingTypeCategoryEnum.UNLISTED_UNIT,
58
+ HoldingTypeCategoryEnum.OTHER
59
+ ]);
60
+ }
61
+ /**
62
+ * @TODO vik remove, use holding.marketValue instead
63
+ */
64
+ get marketValue() {
65
+ return this.sumBy('marketValue');
66
+ }
67
+ /**
68
+ * @TODO vik remove, use holding.sharedMarketValue instead
69
+ */
70
+ get sharedMarketValue() {
71
+ let sharedMarketValue = 0;
72
+ this.items.forEach(trade => {
73
+ sharedMarketValue += trade.ownershipPercent / 100 * trade.marketValue;
74
+ });
75
+ return sharedMarketValue;
76
+ }
77
+ }
78
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS5jb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc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HVlID0gMDtcbiAgICB0aGlzLml0ZW1zLmZvckVhY2godHJhZGUgPT4ge1xuICAgICAgc2hhcmVkTWFya2V0VmFsdWUgKz0gdHJhZGUub3duZXJzaGlwUGVyY2VudCAvIDEwMCAqIHRyYWRlLm1hcmtldFZhbHVlXG4gICAgfSk7XG5cbiAgICByZXR1cm4gc2hhcmVkTWFya2V0VmFsdWU7XG4gIH1cbn1cbiJdfQ==
@@ -1,42 +1,17 @@
1
- import { plainToClass } from 'class-transformer';
2
- import { ExportableCollection } from '../exportable.collection';
3
- import { ExportCell } from '../../models/export/export-cell';
4
- import { ExportCellTypeEnum } from '../../models/export/export-cell-type.enum';
1
+ import { Collection } from '../collection';
2
+ import { Holding } from '../../models';
5
3
  import { HoldingTypeCategoryEnum } from '../../db/Enums';
6
- export class HoldingCollection extends ExportableCollection {
7
- getExportHeader() {
8
- return ['Date', 'Ticker', 'Name', 'Asset type', 'Qty bought', 'Qty current', 'Buy price/Unit', 'Current price/Unit', 'Total MV', 'Profit/Loss'];
9
- }
10
- getExportFooter() {
11
- return [
12
- plainToClass(ExportCell, { value: '', type: ExportCellTypeEnum.STRING }),
13
- ];
14
- }
15
- getExportBody() {
16
- return this.items.map((holding) => [
17
- plainToClass(ExportCell, { value: holding.date, type: ExportCellTypeEnum.DATE }),
18
- plainToClass(ExportCell, { value: holding.type.ticker, type: ExportCellTypeEnum.STRING }),
19
- plainToClass(ExportCell, {
20
- value: holding.type.name,
21
- type: ExportCellTypeEnum.STRING
22
- }),
23
- plainToClass(ExportCell, { value: holding.type.categoryLabel, type: ExportCellTypeEnum.STRING }),
24
- plainToClass(ExportCell, { value: holding.quantity, type: ExportCellTypeEnum.STRING }),
25
- plainToClass(ExportCell, { value: holding.currentQuantity, type: ExportCellTypeEnum.STRING }),
26
- plainToClass(ExportCell, { value: holding.price, type: ExportCellTypeEnum.CURRENCY }),
27
- plainToClass(ExportCell, {
28
- value: holding.type.price,
29
- type: ExportCellTypeEnum.CURRENCY
30
- }),
31
- plainToClass(ExportCell, {
32
- value: holding.marketValue,
33
- type: ExportCellTypeEnum.CURRENCY
34
- }),
35
- plainToClass(ExportCell, {
36
- value: holding.growthCoefficient,
37
- type: ExportCellTypeEnum.PERCENT
38
- }),
39
- ]);
4
+ export class HoldingCollection extends Collection {
5
+ static fromTrades(trades, holdingTypes) {
6
+ const holdingTypesById = holdingTypes.indexBy('id');
7
+ const tradesByHoldingType = trades.groupBy('holdingType.id');
8
+ const items = [];
9
+ for (const key in tradesByHoldingType.items) {
10
+ if (tradesByHoldingType.get(key).sumBy('quantity') > 0) {
11
+ items.push(new Holding(tradesByHoldingType.get(key), holdingTypesById.get(key)));
12
+ }
13
+ }
14
+ return new HoldingCollection(items);
40
15
  }
41
16
  getShares() {
42
17
  return this.filterBy('type.category', HoldingTypeCategoryEnum.STOCK);
@@ -52,27 +27,17 @@ export class HoldingCollection extends ExportableCollection {
52
27
  HoldingTypeCategoryEnum.OTHER
53
28
  ]);
54
29
  }
55
- getPurchaseValue() {
56
- return this.sumBy('purchaseValue');
57
- }
58
30
  get marketValue() {
59
31
  return this.sumBy('marketValue');
60
32
  }
61
- get sharedMarketValue() {
62
- let sharedMarketValue = 0;
63
- this.items.forEach(holding => {
64
- sharedMarketValue += holding.ownershipPercent / 100 * holding.marketValue;
65
- });
66
- return sharedMarketValue;
33
+ get purchaseValue() {
34
+ return this.sumBy('purchaseValue');
67
35
  }
68
36
  getGrowthCoefficient() {
69
- return this.marketValue / this.getPurchaseValue() - 1;
70
- }
71
- getUnsold() {
72
- return this.removeBy('currentQuantity', 0);
37
+ return this.marketValue / this.purchaseValue - 1;
73
38
  }
74
- getUnrealisedProfit() {
75
- return this.marketValue - this.getPurchaseValue();
39
+ getPnl() {
40
+ return this.marketValue - this.purchaseValue;
76
41
  }
77
42
  }
78
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy5jb2xsZWN0aW9uLmpzIiwic291cmNlUm9vdCI6Ii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bnVtLlVOTElTVEVEX1VOSVQsXG4gICAgICBIb2xkaW5nVHlwZUNhdGVnb3J5RW51bS5PVEhFUlxuICAgIF0pO1xuICB9XG5cbiAgZ2V0IG1hcmtldFZhbHVlKCk6IG51bWJlciB7XG4gICAgcmV0dXJuIHRoaXMuc3VtQnkoJ21hcmtldFZhbHVlJyk7XG4gIH1cblxuICBnZXQgcHVyY2hhc2VWYWx1ZSgpOiBudW1iZXIge1xuICAgIHJldHVybiB0aGlzLnN1bUJ5KCdwdXJjaGFzZVZhbHVlJyk7XG4gIH1cblxuICBnZXRHcm93dGhDb2VmZmljaWVudCgpOiBudW1iZXIge1xuICAgIHJldHVybiB0aGlzLm1hcmtldFZhbHVlIC8gdGhpcy5wdXJjaGFzZVZhbHVlIC0gMTtcbiAgfVxuXG4gIGdldFBubCgpIHtcbiAgICByZXR1cm4gdGhpcy5tYXJrZXRWYWx1ZSAtIHRoaXMucHVyY2hhc2VWYWx1ZTtcbiAgfVxufVxuIl19
@@ -1,4 +1,5 @@
1
- export * from './holding.collection';
1
+ export * from './holding-trade.collection';
2
2
  export * from './holding-sale.collection';
3
3
  export * from './holding-type.collection';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvY29sbGVjdGlvbnMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYywyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy5jb2xsZWN0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy1zYWxlLmNvbGxlY3Rpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXR5cGUuY29sbGVjdGlvbic7XG4iXX0=
4
+ export * from './holding.collection';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvY29sbGVjdGlvbnMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLHNCQUFzQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXRyYWRlLmNvbGxlY3Rpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXNhbGUuY29sbGVjdGlvbic7XG5leHBvcnQgKiBmcm9tICcuL2hvbGRpbmctdHlwZS5jb2xsZWN0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy5jb2xsZWN0aW9uJztcbiJdfQ==
@@ -0,0 +1,6 @@
1
+ export var HoldingTradeTypeEnum;
2
+ (function (HoldingTradeTypeEnum) {
3
+ HoldingTradeTypeEnum[HoldingTradeTypeEnum["BUY"] = 1] = "BUY";
4
+ HoldingTradeTypeEnum[HoldingTradeTypeEnum["SELL"] = 2] = "SELL";
5
+ })(HoldingTradeTypeEnum || (HoldingTradeTypeEnum = {}));
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS10eXBlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvaG9sZGluZy9ob2xkaW5nLXRyYWRlLXR5cGUuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxvQkFHWDtBQUhELFdBQVksb0JBQW9CO0lBQzlCLDZEQUFPLENBQUE7SUFDUCwrREFBUSxDQUFBO0FBQ1YsQ0FBQyxFQUhXLG9CQUFvQixLQUFwQixvQkFBb0IsUUFHL0IiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBIb2xkaW5nVHJhZGVUeXBlRW51bSB7XG4gIEJVWSA9IDEsXG4gIFNFTEwgPSAyLFxufVxuIl19
@@ -15,4 +15,4 @@ export var HoldingTypeCategoryEnum;
15
15
  HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["COLLECTIBLE"] = 13] = "COLLECTIBLE";
16
16
  HoldingTypeCategoryEnum[HoldingTypeCategoryEnum["OTHER"] = 14] = "OTHER";
17
17
  })(HoldingTypeCategoryEnum || (HoldingTypeCategoryEnum = {}));
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10eXBlLWNhdGVnb3J5LmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvaG9sZGluZy9ob2xkaW5nLXR5cGUtY2F0ZWdvcnkuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSx1QkFlWDtBQWZELFdBQVksdUJBQXVCO0lBQ2xDLHlFQUFVLENBQUE7SUFDVix1RUFBUyxDQUFBO0lBQ1IsbUVBQU8sQ0FBQTtJQUNQLHFFQUFRLENBQUE7SUFDUixtRkFBZSxDQUFBO0lBQ2YsMkZBQW1C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dBQVksdUJBQXVCO0lBQ2pDLHlFQUFVLENBQUE7SUFDVix1RUFBUyxDQUFBO0lBQ1QsbUVBQU8sQ0FBQTtJQUNQLHFFQUFRLENBQUE7SUFDUixtRkFBZSxDQUFBO0lBQ2YsMkZBQW1CLENBQUE7SUFDbkIsMkVBQVcsQ0FBQTtJQUNYLG1FQUFPLENBQUE7SUFDUCxxRUFBUSxDQUFBO0lBQ1Isd0VBQVUsQ0FBQTtJQUNWLDBGQUFtQixDQUFBO0lBQ25CLHdGQUFrQixDQUFBO0lBQ2xCLG9GQUFnQixDQUFBO0lBQ2hCLHdFQUFVLENBQUE7QUFDWixDQUFDLEVBZlcsdUJBQXVCLEtBQXZCLHVCQUF1QixRQWVsQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIEhvbGRpbmdUeXBlQ2F0ZWdvcnlFbnVtIHtcbiAgQ1JZUFRPID0gMSxcbiAgU1RPQ0sgPSAyLFxuICBFVEYgPSAzLFxuICBGVU5EID0gNCxcbiAgTVVUVUFMX0ZVTkQgPSA1LFxuICBQUkVGRVJSRURfU1RPQ0sgPSA2LFxuICBXQVJSQU5UID0gNyxcbiAgRVRDID0gOCxcbiAgTk9URSA9IDksXG4gIElOREVYID0gMTAsXG4gIFVOTElTVEVEX1NUT0NLID0gMTEsIC8vIG90aGVyc1xuICBVTkxJU1RFRF9VTklUID0gMTIsIC8vIG90aGVyc1xuICBDT0xMRUNUSUJMRSA9IDEzLCAvLyBvdGhlcnNcbiAgT1RIRVIgPSAxNCwgLy8gb3RoZXJzXG59XG4iXX0=
@@ -1,3 +1,4 @@
1
1
  export * from './holding-type-category.enum';
2
2
  export * from './holding-type-exchange-list.enum';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsbUNBQW1DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2hvbGRpbmctdHlwZS1jYXRlZ29yeS5lbnVtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10eXBlLWV4Y2hhbmdlLWxpc3QuZW51bSc7XG4iXX0=
3
+ export * from './holding-trade-type.enum';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvRW51bXMvaG9sZGluZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDhCQUE4QixDQUFDO0FBQzdDLGNBQWMsbUNBQW1DLENBQUM7QUFDbEQsY0FBYywyQkFBMkIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10eXBlLWNhdGVnb3J5LmVudW0nO1xuZXhwb3J0ICogZnJvbSAnLi9ob2xkaW5nLXR5cGUtZXhjaGFuZ2UtbGlzdC5lbnVtJztcbmV4cG9ydCAqIGZyb20gJy4vaG9sZGluZy10cmFkZS10eXBlLmVudW0nO1xuIl19
@@ -1,3 +1,3 @@
1
1
  export class HoldingSale {
2
2
  }
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1zYWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9z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BEYXRlO1xuICBxdWFudGl0eT86IG51bWJlcjtcbiAgcHJpY2U/OiBudW1iZXI7XG4gIGZlZT86IG51bWJlcjtcbiAgdG90YWw/OiBudW1iZXI7XG4gIHRvdGFsQ2FwaXRhbEdhaW4/OiBudW1iZXI7XG4gIGdyb3NzQ2FwaXRhbEdhaW4/OiBudW1iZXI7XG4gIG5ldENhcGl0YWxHYWluPzogbnVtYmVyO1xuICBpZD86IG51bWJlcjtcbiAgaG9sZGluZz86IEhvbGRpbmdUcmFkZTtcbiAgZmlsZT86IEZpbGU7XG59XG4iXX0=
@@ -0,0 +1,3 @@
1
+ export class HoldingTradeImport {
2
+ }
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS1pbXBvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvZGIvTW9kZWxzL2hvbGRpbmcvaG9sZGluZy10cmFkZS1pbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsTUFBTSxPQUFPLGtCQUFrQjtDQU05QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEhvbGRpbmdUcmFkZSB9IGZyb20gJy4vaG9sZGluZy10cmFkZSc7XG5cbmV4cG9ydCBjbGFzcyBIb2xkaW5nVHJhZGVJbXBvcnQge1xuICBvcmlnaW5hbE5hbWU/OiBzdHJpbmc7XG4gIGlkPzogbnVtYmVyO1xuICBjcmVhdGVkQXQ/OiBEYXRlO1xuICB1cGRhdGVkQXQ/OiBEYXRlO1xuICBob2xkaW5ncz86IEhvbGRpbmdUcmFkZVtdO1xufVxuIl19
@@ -0,0 +1,3 @@
1
+ export class HoldingTrade {
2
+ }
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy10cmFkZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9kYi9Nb2RlbHMvaG9sZGluZy9ob2xkaW5nLXRyYWRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBLE1BQU0sT0FBTyxZQUFZO0NBWXhCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVXNlciB9IGZyb20gJy4uL3VzZXIvdXNlcic7XG5pbXBvcnQgeyBIb2xkaW5nVHlwZSB9IGZyb20gJy4vaG9sZGluZy10eXBlJztcbmltcG9ydCB7IEZpbGUgfSBmcm9tICcuLi9maWxlJztcbmltcG9ydCB7IEhvbGRpbmdTYWxlIH0gZnJvbSAnLi9ob2xkaW5nLXNhbGUnO1xuXG5leHBvcnQgY2xhc3MgSG9sZGluZ1RyYWRlIHtcbiAgaXNUYXhGcmVlPzogYm9vbGVhbjtcbiAgZGF0ZT86IERhdGU7XG4gIHF1YW50aXR5PzogbnVtYmVyO1xuICBwcmljZT86IG51bWJlcjtcbiAgZmVlPzogbnVtYmVyO1xuICBvd25lcnNoaXBQZXJjZW50PzogbnVtYmVyO1xuICBpZD86IG51bWJlcjtcbiAgdXNlcj86IFVzZXI7XG4gIHR5cGU/OiBIb2xkaW5nVHlwZTtcbiAgZmlsZT86IEZpbGU7XG4gIHNhbGVzPzogSG9sZGluZ1NhbGVbXTtcbn1cbiJdfQ==
@@ -1,5 +1,5 @@
1
- export * from './holding';
1
+ export * from './holding-trade';
2
2
  export * from './holding-type';
3
3
  export * from './holding-sale';
4
4
  export * from './holding-type-exchange';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90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