mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Allow price up to 4 decimals instead of 2 (#1077)
* Allow price to be 4 decimals * remove logging * Finalize custom decimal places by user setting * Typo Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
@@ -171,8 +171,8 @@ if (GetUriParam("list") !== undefined)
|
||||
|
||||
if (GetUriParam("amount") !== undefined)
|
||||
{
|
||||
$("#amount").val(parseFloat(GetUriParam("amount")).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: 4 }));
|
||||
$("#amount").val(parseFloat(GetUriParam("amount")).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts }));
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglist-form');
|
||||
}
|
||||
|
||||
$("#amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %s', 0.01.toLocaleString()));
|
||||
$("#amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %s', "0." + "0".repeat(parseInt(Grocy.UserSettings.stock_decimal_places_amounts) - 1) + "1"));
|
||||
|
Reference in New Issue
Block a user