diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 08a66d1b8c6..eb927756263 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -41,6 +41,19 @@ if (empty($id)) { $id = $object->id; } +$pdluoid = GETPOST('pdluoid', 'int'); + +$pdluo = new Productbatch($db); + +if ($pdluoid > 0) { + $result = $pdluo->fetch($pdluoid); + if ($result > 0) { + $pdluoid = $pdluo->id; + } else { + dol_print_error($db, $pdluo->error, $pdluo->errors); + } +} + print '