@barchart/portfolio-api-common 1.0.156 → 1.0.157
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.
|
@@ -123,6 +123,7 @@ module.exports = (() => {
|
|
|
123
123
|
this._dataActual.summaryTotalPrevious = null;
|
|
124
124
|
this._dataActual.cashTotal = null;
|
|
125
125
|
|
|
126
|
+
this._dataFormat.type = null;
|
|
126
127
|
this._dataFormat.currentPrice = null;
|
|
127
128
|
this._dataFormat.previousPrice = null;
|
|
128
129
|
this._dataFormat.basis = null;
|
|
@@ -508,6 +509,8 @@ module.exports = (() => {
|
|
|
508
509
|
if (group.single) {
|
|
509
510
|
const item = group._items[0];
|
|
510
511
|
|
|
512
|
+
format.type = item.data.type || null;
|
|
513
|
+
|
|
511
514
|
actual.quantity = item.position.snapshot.open;
|
|
512
515
|
actual.basisPrice = item.data.basisPrice;
|
|
513
516
|
|
|
@@ -61,6 +61,8 @@ module.exports = (() => {
|
|
|
61
61
|
this._data.newsExists = false;
|
|
62
62
|
this._data.fundamental = { };
|
|
63
63
|
|
|
64
|
+
this._data.type = null;
|
|
65
|
+
|
|
64
66
|
calculateStaticData(this);
|
|
65
67
|
calculatePriceData(this, null);
|
|
66
68
|
|
|
@@ -234,6 +236,10 @@ module.exports = (() => {
|
|
|
234
236
|
|
|
235
237
|
const data = item._data;
|
|
236
238
|
|
|
239
|
+
if (position.miscellany && position.miscellany.type && position.miscellany.type.value) {
|
|
240
|
+
data.type = position.miscellany.type.value;
|
|
241
|
+
}
|
|
242
|
+
|
|
237
243
|
data.previousPrice = position.previous || null;
|
|
238
244
|
|
|
239
245
|
let basis;
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -1368,6 +1368,7 @@ module.exports = (() => {
|
|
|
1368
1368
|
this._dataActual.summaryTotalPrevious = null;
|
|
1369
1369
|
this._dataActual.cashTotal = null;
|
|
1370
1370
|
|
|
1371
|
+
this._dataFormat.type = null;
|
|
1371
1372
|
this._dataFormat.currentPrice = null;
|
|
1372
1373
|
this._dataFormat.previousPrice = null;
|
|
1373
1374
|
this._dataFormat.basis = null;
|
|
@@ -1753,6 +1754,8 @@ module.exports = (() => {
|
|
|
1753
1754
|
if (group.single) {
|
|
1754
1755
|
const item = group._items[0];
|
|
1755
1756
|
|
|
1757
|
+
format.type = item.data.type || null;
|
|
1758
|
+
|
|
1756
1759
|
actual.quantity = item.position.snapshot.open;
|
|
1757
1760
|
actual.basisPrice = item.data.basisPrice;
|
|
1758
1761
|
|
|
@@ -1972,6 +1975,8 @@ module.exports = (() => {
|
|
|
1972
1975
|
this._data.newsExists = false;
|
|
1973
1976
|
this._data.fundamental = { };
|
|
1974
1977
|
|
|
1978
|
+
this._data.type = null;
|
|
1979
|
+
|
|
1975
1980
|
calculateStaticData(this);
|
|
1976
1981
|
calculatePriceData(this, null);
|
|
1977
1982
|
|
|
@@ -2145,6 +2150,10 @@ module.exports = (() => {
|
|
|
2145
2150
|
|
|
2146
2151
|
const data = item._data;
|
|
2147
2152
|
|
|
2153
|
+
if (position.miscellany && position.miscellany.type && position.miscellany.type.value) {
|
|
2154
|
+
data.type = position.miscellany.type.value;
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2148
2157
|
data.previousPrice = position.previous || null;
|
|
2149
2158
|
|
|
2150
2159
|
let basis;
|