mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Only apply stock_auto_decimal_separator_prices
when value is not empty and not already contains a decimal separator (fixes #1917)
This commit is contained in:
parent
9498dd9c67
commit
2de87eb446
@ -98,6 +98,11 @@ $(".numberpicker.locale-number-input.locale-number-currency").on("blur", functio
|
||||
if (BoolVal(Grocy.UserSettings.stock_auto_decimal_separator_prices))
|
||||
{
|
||||
var value = this.value.toString();
|
||||
if (value == null || value.isEmpty() || value.includes(".") || value.includes(","))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var decimalPlaces = parseInt(Grocy.UserSettings.stock_decimal_places_prices_input);
|
||||
|
||||
if (value.length <= decimalPlaces)
|
||||
|
Loading…
x
Reference in New Issue
Block a user