diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index 96dcbf25..eccd940d 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -58,7 +58,7 @@ _- (Because the stock quantity unit is now the base for everything, it cannot be - Fixed that the aggregated amount of parent products was wrong on the stock overview page when the child products had not the same stock quantity units - Fixed that edited stock entries were not considered for the price history chart on the product card - Fixed that `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` is set to `false`, the purchase page validation failed (thanks @fipwmaqzufheoxq92ebc) -- Fixed that consuming products with enabled tare weight handling did not work on the stock entries page (also fixed that opening those products is not possible there) +- Fixed that consuming (and editing the amount of) products with enabled tare weight handling did not work on the stock entries page - Fixed that the recipes dropdown on the consume page also displayed internal recipes (thanks @kriddles) - Fixed that opening tare weight handling enabled products is not possible via the UI and the API (as this makes no sense) diff --git a/public/viewjs/stockentryform.js b/public/viewjs/stockentryform.js index c79d1ad4..96181f50 100644 --- a/public/viewjs/stockentryform.js +++ b/public/viewjs/stockentryform.js @@ -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) { diff --git a/views/stockentryform.blade.php b/views/stockentryform.blade.php index edda85a7..7d131e23 100644 --- a/views/stockentryform.blade.php +++ b/views/stockentryform.blade.php @@ -60,8 +60,6 @@ 'contextInfoId' => 'amount_qu_unit', 'invalidFeedback' => $__t('The amount cannot be lower than %s', '0'), 'additionalAttributes' => 'data-not-equal="-1"', - 'additionalHtmlContextHelp' => '