@barchart/portfolio-api-common 1.2.107 → 1.2.108

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.
@@ -734,7 +734,7 @@ module.exports = (() => {
734
734
  if (group.single && group._items.length === 1) {
735
735
  const item = group._items[0];
736
736
 
737
- actual.quantity = item.position.snapshot.open;
737
+ actual.quantity = item.data.quantity;
738
738
  actual.quantityPrevious = item.data.quantityPrevious;
739
739
 
740
740
  actual.basisPrice = item.data.basisPrice;
@@ -71,8 +71,8 @@ module.exports = (() => {
71
71
  this._data.marketPrevious = null;
72
72
  this._data.marketPrevious2 = null;
73
73
 
74
+ this._data.quantity = null;
74
75
  this._data.quantityPrevious = null;
75
- this._data.quantityPrevious2 = null;
76
76
 
77
77
  this._data.realized = null;
78
78
  this._data.income = null;
@@ -385,6 +385,7 @@ module.exports = (() => {
385
385
 
386
386
  const data = item._data;
387
387
 
388
+ data.quantity = snapshot.open;
388
389
  data.previousPrice = position.previous || null;
389
390
 
390
391
  let basis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.2.107",
3
+ "version": "1.2.108",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -3194,7 +3194,7 @@ module.exports = (() => {
3194
3194
  if (group.single && group._items.length === 1) {
3195
3195
  const item = group._items[0];
3196
3196
 
3197
- actual.quantity = item.position.snapshot.open;
3197
+ actual.quantity = item.data.quantity;
3198
3198
  actual.quantityPrevious = item.data.quantityPrevious;
3199
3199
 
3200
3200
  actual.basisPrice = item.data.basisPrice;
@@ -3472,8 +3472,8 @@ module.exports = (() => {
3472
3472
  this._data.marketPrevious = null;
3473
3473
  this._data.marketPrevious2 = null;
3474
3474
 
3475
+ this._data.quantity = null;
3475
3476
  this._data.quantityPrevious = null;
3476
- this._data.quantityPrevious2 = null;
3477
3477
 
3478
3478
  this._data.realized = null;
3479
3479
  this._data.income = null;
@@ -3786,6 +3786,7 @@ module.exports = (() => {
3786
3786
 
3787
3787
  const data = item._data;
3788
3788
 
3789
+ data.quantity = snapshot.open;
3789
3790
  data.previousPrice = position.previous || null;
3790
3791
 
3791
3792
  let basis;