Update validateHandlingCost to use 2 decimal precision for parsing numbers.

This commit is contained in:
Jan 2025-12-07 18:22:30 +01:00
parent 7531efab71
commit 89a132dc4a

View file

@ -151,7 +151,7 @@ export default {
this.handlingCostActive = value; this.handlingCostActive = value;
}, },
validateHandlingCost(event, type) { validateHandlingCost(event, type) {
const value = event.target.value == null ? null : parseNumberFromString(event.target.value, 0); const value = event.target.value == null ? null : parseNumberFromString(event.target.value, 2);
const validatedValue = value == null ? null : Math.max(0, value); const validatedValue = value == null ? null : Math.max(0, value);
const stringified = validatedValue === null ? '' : validatedValue.toFixed(); const stringified = validatedValue === null ? '' : validatedValue.toFixed();