From b04d1dedb1361222e4bbc730ad2148ea1abba070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Mon, 5 Jan 2026 13:33:07 +0100 Subject: [PATCH] Fix qty 'tobuy' from INT to FLOAT type (#36780) Change qty 'tobuy' from INT to FLOAT type Co-authored-by: Laurent Destailleur --- htdocs/product/stock/replenish.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 37f7ab62dc0..9ad3709c015 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -8,6 +8,7 @@ * Copyright (C) 2021 Ferran Marcet * Copyright (C) 2021 Antonin MARCHAL * Copyright (C) 2024-2025 MDW + * Copyright (C) 2025 Josep LluĂ­s Amador * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -66,7 +67,7 @@ $search_ref = GETPOST('search_ref', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $sall = trim(GETPOST('search_all', 'alphanohtml')); $type = GETPOSTINT('type'); -$tobuy = GETPOSTINT('tobuy'); +$tobuy = GETPOSTFLOAT('tobuy'); $salert = GETPOST('salert', 'alpha'); $includeproductswithoutdesiredqty = GETPOST('includeproductswithoutdesiredqty', 'alpha'); $mode = GETPOST('mode', 'alpha'); @@ -184,7 +185,7 @@ if ($action == 'order' && GETPOST('valid') && $user->hasRight('fournisseur', 'co $box = $i; $supplierpriceid = GETPOSTINT('fourn'.$i); //get all the parameters needed to create a line - $qty = GETPOSTINT('tobuy'.$i); + $qty = GETPOSTFLOAT('tobuy'.$i); $idprod = $productsupplier->get_buyprice($supplierpriceid, $qty); $res = $productsupplier->fetch($idprod); if ($res && $idprod > 0) {