mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 09:11:11 +00:00
Allow decimal amounts in general for the shopping list
This commit is contained in:
@@ -38,10 +38,10 @@ class RecipesService extends BaseService
|
||||
{
|
||||
$product = $this->getDataBase()->products($recipePosition->product_id);
|
||||
|
||||
$toOrderAmount = ceil(($recipePosition->missing_amount - $recipePosition->amount_on_shopping_list) / $product->qu_factor_purchase_to_stock);
|
||||
$toOrderAmount = round(($recipePosition->missing_amount - $recipePosition->amount_on_shopping_list) / $product->qu_factor_purchase_to_stock, 2);
|
||||
if ($recipe->not_check_shoppinglist == 1)
|
||||
{
|
||||
$toOrderAmount = ceil($recipePosition->missing_amount / $product->qu_factor_purchase_to_stock);
|
||||
$toOrderAmount = round($recipePosition->missing_amount / $product->qu_factor_purchase_to_stock, 2);
|
||||
}
|
||||
|
||||
if($toOrderAmount > 0)
|
||||
|
Reference in New Issue
Block a user