From 0233701c0483bb0e3cce76ed95054c2476aa6011 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 1 Jan 2024 01:51:24 +0100 Subject: [PATCH] convert and ceil to next integer the amount to order for the recipe --- services/RecipesService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/RecipesService.php b/services/RecipesService.php index adad30fc..dc5cae02 100644 --- a/services/RecipesService.php +++ b/services/RecipesService.php @@ -41,7 +41,7 @@ class RecipesService extends BaseService $conversion = $this->getDatabase()->cache__quantity_unit_conversions_resolved()->where('product_id = :1 AND from_qu_id = :2 AND to_qu_id = :3', $recipePosition->product_id, $recipePosition->qu_id, $product->qu_id_stock)->fetch(); if ($conversion != null) { - $toOrderAmount = $toOrderAmount * $conversion->factor; + $toOrderAmount = ceil($toOrderAmount * $conversion->factor); } }