@barchart/portfolio-api-common 1.3.11 → 1.3.12

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.
@@ -200,7 +200,7 @@ module.exports = (() => {
200
200
 
201
201
  if (t.dividend) {
202
202
  if (t.dividend.numerator && t.dividend.denominator) {
203
- f.rate = t.dividend.numerator.divide(t.dividend.denominator);
203
+ f.rate = `${t.dividend.numerator.round(4).toFixed()} for ${t.dividend.denominator.toFixed()}`;
204
204
  } else if (t.dividend.rate) {
205
205
  f.rate = t.dividend.rate;
206
206
  }
@@ -222,7 +222,7 @@ module.exports = (() => {
222
222
 
223
223
  if (t.dividend) {
224
224
  if (t.dividend.numerator && t.dividend.denominator) {
225
- f.rate = t.dividend.numerator.divide(t.dividend.denominator);
225
+ f.rate = `${t.dividend.numerator.round(4).toFixed()} for ${t.dividend.denominator.toFixed()}`;
226
226
  } else if (t.dividend.rate) {
227
227
  f.rate = t.dividend.rate;
228
228
  }
@@ -249,7 +249,9 @@ module.exports = (() => {
249
249
  };
250
250
 
251
251
  const splitFormatter = (t, f) => {
252
- f.rate = t.split.numerator.divide(t.split.denominator);
252
+ f.boughtSold = t.quantity;
253
+
254
+ f.rate = `${t.dividend.numerator.round(4).toFixed()} for ${t.dividend.denominator.toFixed()}`;
253
255
 
254
256
  f.shares = t.snapshot.open.subtract(t.quantity);
255
257
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",