Skip to content

Commit

Permalink
Fix total price amount relation on purchase (fixes grocy#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
berrnd committed Apr 13, 2020
1 parent 1fc802c commit 9a93c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/58_UNRELEASED_2020-xx-xx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion public/viewjs/purchase.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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

Expand Down

0 comments on commit 9a93c32

Please sign in to comment.