mirror of
https://github.com/grocy/grocy.git
synced 2025-08-21 12:52:39 +00:00
Use correct amount for the success popup on the consume page (fixes #766)
This commit is contained in:
@@ -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 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 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 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
|
### Recipe improvements/fixes
|
||||||
- It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett)
|
- It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett)
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
if (productDetails.product.enable_tare_weight_handling == 1)
|
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) + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockTransaction(\'' + bookingResponse.transaction_id + '\')"><i class="fas fa-undo"></i> ' + __t("Undo") + '</a>';
|
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) + '<br><a class="btn btn-secondary btn-sm mt-2" href="#" onclick="UndoStockTransaction(\'' + bookingResponse.transaction_id + '\')"><i class="fas fa-undo"></i> ' + __t("Undo") + '</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user