diff --git a/changelog/60_UNRELEASED_2020-xx-xx.md b/changelog/60_UNRELEASED_2020-xx-xx.md index b966dbeb..4c58496d 100644 --- a/changelog/60_UNRELEASED_2020-xx-xx.md +++ b/changelog/60_UNRELEASED_2020-xx-xx.md @@ -45,6 +45,7 @@ - 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) ### Shopping list improvements - Decimal amounts are now allowed (for any product, rounded by two decimal places) diff --git a/public/viewjs/stockentries.js b/public/viewjs/stockentries.js index b902515d..40b83959 100644 --- a/public/viewjs/stockentries.js +++ b/public/viewjs/stockentries.js @@ -43,7 +43,7 @@ $(document).on('click', '.stock-consume-button', function(e) var wasSpoiled = $(e.currentTarget).hasClass("stock-consume-button-spoiled"); - Grocy.Api.Post('stock/products/' + productId + '/consume', { 'amount': consumeAmount, 'spoiled': wasSpoiled, 'location_id': locationId, 'stock_entry_id': specificStockEntryId }, + Grocy.Api.Post('stock/products/' + productId + '/consume', { 'amount': consumeAmount, 'spoiled': wasSpoiled, 'location_id': locationId, 'stock_entry_id': specificStockEntryId, 'exact_amount': true }, function(bookingResponse) { Grocy.Api.Get('stock/products/' + productId,