stockentryform amount doesn't need to handle tare weight

This commit is contained in:
Bernd Bestel
2020-11-14 22:54:29 +01:00
parent 28276191cc
commit db5c9ce3e8
3 changed files with 1 additions and 15 deletions

View File

@@ -109,18 +109,6 @@ Grocy.Api.Get('stock/products/' + Grocy.EditObjectProductId,
$("#amount").attr("step", "1");
$("#amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %1$s', '1'));
}
if (productDetails.product.enable_tare_weight_handling == 1)
{
$("#amount").attr("min", productDetails.product.tare_weight);
$("#amount").parent().find(".invalid-feedback").text(__t('The amount cannot be lower than %1$s', parseFloat(productDetails.product.tare_weight).toLocaleString({ minimumFractionDigits: 0, maximumFractionDigits: Grocy.UserSettings.stock_decimal_places_amounts })));
$("#tare-weight-handling-info").removeClass("d-none");
}
else
{
$("#tare-weight-handling-info").addClass("d-none");
}
},
function(xhr)
{