diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index a69291bc..91bb5a27 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -26,6 +26,7 @@ - Fixed that the shopping cart icon on the stock overview page was also shown if the product was on an already deleted shopping list (if enabled) (thanks @fipwmaqzufheoxq92ebc) - Fixed that when editing a stock entry without a price, the price field was prefilled with `1` - Fixed that location & product groups filter on the stock overview page did a contains search instead an exact search +- Fixed that the amount on the success popup was wrong when consuming a product with "Tare weight handling" enabled ### Recipe improvements/fixes - It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett) diff --git a/public/viewjs/consume.js b/public/viewjs/consume.js index eb6572cf..cadcc6d2 100644 --- a/public/viewjs/consume.js +++ b/public/viewjs/consume.js @@ -72,7 +72,7 @@ if (productDetails.product.enable_tare_weight_handling == 1) { - var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount - parseFloat(productDetails.product.tare_weight)) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''; + var successMessage = __t('Removed %1$s of %2$s from stock', Math.abs(jsonForm.amount - (parseFloat(productDetails.product.tare_weight) + parseFloat(productDetails.stock_amount))) + " " + __n(jsonForm.amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural), productDetails.product.name) + '
' + __t("Undo") + ''; } else {