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) {