mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Don't round up missing amounts and allow decimal numbers (fixes #758)
This commit is contained in:
parent
9d04d81744
commit
ece880ea44
@ -28,6 +28,10 @@
|
||||
- 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
|
||||
|
||||
|
||||
### Shopping list improvements
|
||||
- "Add products that are below defined min. stock amount" always rounded up the missing amount to an integral number, this now allows decimal numbers
|
||||
|
||||
### Recipe improvements/fixes
|
||||
- It's now possible to print recipes (button next to the recipe title) (thanks @zsarnett)
|
||||
- Improved recipe card presentation (thanks @zsarnett)
|
||||
|
@ -856,7 +856,7 @@ class StockService extends BaseService
|
||||
foreach ($missingProducts as $missingProduct)
|
||||
{
|
||||
$product = $this->getDatabase()->products()->where('id', $missingProduct->id)->fetch();
|
||||
$amountToAdd = ceil($missingProduct->amount_missing / $product->qu_factor_purchase_to_stock);
|
||||
$amountToAdd = round($missingProduct->amount_missing / $product->qu_factor_purchase_to_stock, 2);
|
||||
|
||||
$alreadyExistingEntry = $this->getDatabase()->shopping_list()->where('product_id', $missingProduct->id)->fetch();
|
||||
if ($alreadyExistingEntry) // Update
|
||||
|
Loading…
x
Reference in New Issue
Block a user