From 618ff5609f23e20f37671478bc1fd7330fcefa90 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 3 May 2019 18:32:59 +0200 Subject: [PATCH] Fixed success message on inventory page showed the previous amount instead of the new one (references #224) --- public/viewjs/inventory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/viewjs/inventory.js b/public/viewjs/inventory.js index e3be340d..bc57d3a9 100644 --- a/public/viewjs/inventory.js +++ b/public/viewjs/inventory.js @@ -44,7 +44,7 @@ } Grocy.FrontendHelpers.EndUiBusy("inventory-form"); - toastr.success(__t('Stock amount of %s is now %s %s', productDetails.product.name, productDetails.stock_amount, __n(productDetails.stock_amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + '
' + __t("Undo") + ''); + toastr.success(__t('Stock amount of %s is now %s %s', productDetails.product.name, jsonForm.new_amount, __n(jsonForm.new_amount, productDetails.quantity_unit_stock.name, productDetails.quantity_unit_stock.name_plural)) + '
' + __t("Undo") + ''); $('#inventory-change-info').addClass('d-none'); $("#tare-weight-handling-info").addClass("d-none");