taxtank-core 2.0.33 → 2.0.34

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.
@@ -9834,8 +9834,12 @@ class HoldingTradeCollection extends ExportableCollection {
9834
9834
  getSales() {
9835
9835
  return this.filterBy('type', HoldingTradeTypeEnum.SELL);
9836
9836
  }
9837
+ getConsolidates() {
9838
+ return this.filterBy('type', HoldingTradeTypeEnum.CONSOLIDATE);
9839
+ }
9837
9840
  getPosition() {
9838
- return this.getPurchases().sumBy('quantity') - this.getSales().sumBy('quantity');
9841
+ return this.getPurchases().sumBy('quantity') - this.getSales().sumBy('quantity')
9842
+ - this.getConsolidates().sumBy('quantity');
9839
9843
  }
9840
9844
  getShares() {
9841
9845
  return this.filterBy('holdingType.category', HoldingTypeCategoryEnum.STOCK);