@softwear/latestcollectioncore 1.0.101 → 1.0.103

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.
@@ -275,7 +275,7 @@ function postAgg(v, timeFrame) {
275
275
  v[PROFITABILITY] = (v[PROFIT] / totalCostSold) * v[QTY_TURNOVER_VELOCITY] * 100;
276
276
  v[MARGIN] = (v[PROFIT] / totalAmountSold) * 100;
277
277
  v[RETURN_PERCENTAGE] = (v[QTY_RETURN] / v[QTY_RECIEVED]) * 100;
278
- v[QTY_SOLD_BEFORE_RETURNS] = v[QTY_SOLD] + Math.abs(v[QTY_RETURN]);
278
+ v[QTY_SOLD_BEFORE_RETURNS] = totalQtySold + Math.abs(v[QTY_RETURN]);
279
279
  v[QTY_SOLD] = totalQtySold;
280
280
  v[AMOUNT_SOLD_EXCL] = totalAmountSold;
281
281
  v[COSTPRICE_SOLD] = totalCostSold;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwear/latestcollectioncore",
3
- "version": "1.0.101",
3
+ "version": "1.0.103",
4
4
  "description": "Core functions for LatestCollections applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,6 +29,6 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "date-fns": "^2.29.3",
32
- "filtrex": "^3.0.0"
32
+ "filtrex": "^2.2.3"
33
33
  }
34
34
  }
@@ -341,7 +341,7 @@ function postAgg(v: any, timeFrame: number): void {
341
341
  v[PROFITABILITY] = (v[PROFIT] / totalCostSold) * v[QTY_TURNOVER_VELOCITY] * 100
342
342
  v[MARGIN] = (v[PROFIT] / totalAmountSold) * 100
343
343
  v[RETURN_PERCENTAGE] = (v[QTY_RETURN] / v[QTY_RECIEVED]) * 100
344
- v[QTY_SOLD_BEFORE_RETURNS] = v[QTY_SOLD] + Math.abs(v[QTY_RETURN])
344
+ v[QTY_SOLD_BEFORE_RETURNS] = totalQtySold + Math.abs(v[QTY_RETURN])
345
345
  v[QTY_SOLD] = totalQtySold
346
346
  v[AMOUNT_SOLD_EXCL] = totalAmountSold
347
347
  v[COSTPRICE_SOLD] = totalCostSold