@darkpos/pricing 1.0.38 → 1.0.39

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.
@@ -14,7 +14,6 @@ module.exports = ({ _, constants, utils, localization, actions }) => {
14
14
  const modifier = _modifier;
15
15
  const { name } = modifier;
16
16
  const compute = getComputeModField(modifier);
17
- modifier.compute = compute;
18
17
  const { type, action, amount = 0 } = compute;
19
18
  const _computed = {
20
19
  amount: 0,
@@ -24,7 +23,8 @@ module.exports = ({ _, constants, utils, localization, actions }) => {
24
23
  const maxAmountProp = actions.getProperty(modifier, 'maxAmount');
25
24
 
26
25
  if (!options.skip) {
27
- const maxAmountCalc = actions.isFixedAdd(modifier)
26
+ const maxAmountCalc =
27
+ actions.isFixedAdd(modifier) || actions.isAmountOverride(modifier)
28
28
  ? amount
29
29
  : math.mul(options.price, options.quantity);
30
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darkpos/pricing",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "Pricing calculator",
5
5
  "author": "Dark POS",
6
6
  "license": "ISC",
@@ -36,5 +36,5 @@
36
36
  "supertest": "^6.2.3",
37
37
  "supervisor": "^0.12.0"
38
38
  },
39
- "gitHead": "6d87c96080369a419d9f2ae7fb77205be0c62d02"
39
+ "gitHead": "810d5db51e47904e9813b4abdf5867d823117e4c"
40
40
  }