mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 03:04:36 +00:00
Don't round up missing amounts and allow decimal numbers (fixes #758)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user