Fix total price amount relation on purchase (fixes #722)

This commit is contained in:
Bernd Bestel 2020-04-13 14:52:13 +02:00
parent 1fc802c30e
commit 9a93c32d3c
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
- Fixed that when editing a stock entry and setting a decimal amount, the decimal part was ignored (only possible when the product option "Allow partial units in stock" is enabled)
- Fixed that "Default best before days" and "Default best before days after opened" on the product edit page were always shown regardless of the feature flags `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` and `FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING`
- Fixed that the form validation limits for the amount input and products with enabled tare weight handling were wrong
- Fixed that the price was saved wrong for products with a different purchase/stock quantity unit when using "Total price" on purchase (resulted for example in wrong recipe costs)
### Shopping list fixes
- Fixed that the "shopping list to stock workflow"-dialog was not visible in compact view

View File

@ -17,7 +17,7 @@
if ($("input[name='price-type']:checked").val() == "total-price")
{
price = price / amount;
price = price / jsonForm.amount;
}
}