mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Optimized "auto decimal separator for price inputs" (references #1345)
This commit is contained in:
parent
edfa404ed6
commit
5478bec2c7
@ -102,7 +102,7 @@ $(".numberpicker.locale-number-input.locale-number-currency").on("blur", functio
|
||||
|
||||
if (value.length <= decimalPlaces)
|
||||
{
|
||||
return;
|
||||
value = value.padStart(Grocy.UserSettings.stock_decimal_places_prices, "0");
|
||||
}
|
||||
|
||||
var valueNew = parseFloat(value.substring(0, value.length - decimalPlaces) + '.' + value.slice(decimalPlaces * -1)).toLocaleString(undefined, { minimumFractionDigits: decimalPlaces, maximumFractionDigits: decimalPlaces });
|
||||
|
Loading…
x
Reference in New Issue
Block a user