@softwear/latestcollectioncore 1.0.118 → 1.0.119

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.
@@ -173,8 +173,7 @@ function aggregator({ beginTimestamp, endTimestamp, filterExpression, aggregatio
173
173
  transaction.vector = tmp;
174
174
  }
175
175
  const v = transaction.vector;
176
- console.log(transaction.vat || sku.vat || 21);
177
- v[AMOUNT_SOLD_MAX] = (0, index_1.round2)((((sku === null || sku === void 0 ? void 0 : sku.price) || 0) / ((100 + (transaction.vat || sku.vat || 21)) / 100)) * v[QTY_SOLD]);
176
+ v[AMOUNT_SOLD_MAX] = (0, index_1.round2)((((sku === null || sku === void 0 ? void 0 : sku.price) || 0) / ((100 + (transaction.vat || (sku === null || sku === void 0 ? void 0 : sku.vat) || 21)) / 100)) * v[QTY_SOLD]);
178
177
  v[AMOUNT_SOLD_DISCOUNT] = (0, index_1.round2)(v[AMOUNT_SOLD_MAX] - v[AMOUNT_SOLD_EXCL]);
179
178
  }
180
179
  if (totals)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwear/latestcollectioncore",
3
- "version": "1.0.118",
3
+ "version": "1.0.119",
4
4
  "description": "Core functions for LatestCollections applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -249,8 +249,7 @@ function aggregator({
249
249
  transaction.vector = tmp
250
250
  }
251
251
  const v = transaction.vector
252
- console.log(transaction.vat || sku.vat || 21)
253
- v[AMOUNT_SOLD_MAX] = round2(((sku?.price || 0) / ((100 + (transaction.vat || sku.vat || 21)) / 100)) * v[QTY_SOLD])
252
+ v[AMOUNT_SOLD_MAX] = round2(((sku?.price || 0) / ((100 + (transaction.vat || sku?.vat || 21)) / 100)) * v[QTY_SOLD])
254
253
  v[AMOUNT_SOLD_DISCOUNT] = round2(v[AMOUNT_SOLD_MAX] - v[AMOUNT_SOLD_EXCL])
255
254
  }
256
255