Fixed consuming tare weight handling enabled products on the stock entries page (fixes #988)

This commit is contained in:
Bernd Bestel
2020-10-18 14:51:32 +02:00
parent 196d304de6
commit 9115645e19
2 changed files with 2 additions and 1 deletions

View File

@@ -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 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 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 `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 ### Shopping list improvements
- Decimal amounts are now allowed (for any product, rounded by two decimal places) - Decimal amounts are now allowed (for any product, rounded by two decimal places)

View File

@@ -43,7 +43,7 @@ $(document).on('click', '.stock-consume-button', function(e)
var wasSpoiled = $(e.currentTarget).hasClass("stock-consume-button-spoiled"); 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) function(bookingResponse)
{ {
Grocy.Api.Get('stock/products/' + productId, Grocy.Api.Get('stock/products/' + productId,