diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index c2f8ddb4470..252763ef43b 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -6,6 +6,7 @@ * Copyright (C) 2016 Francis Appels * Copyright (C) 2021 Noé Cendrier * Copyright (C) 2021 Frédéric France + * Copyright (C) 2022 Charlene Benke * * 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 @@ -679,6 +680,8 @@ if ($action == 'create') { if ($resql) { $num = $db->num_rows($resql); $i = 0; + $sameunits = true; + while ($i < $num) { $objp = $db->fetch_object($resql); @@ -960,7 +963,7 @@ if ($action != 'create' && $action != 'edit' && $action != 'delete') { $delallowed = $usercancreate; $modulepart = 'stock'; - print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); + print $formfile->showdocuments($modulepart, $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 0, 0, 0, 28, 0, '', 0, '', '', '', $object); $somethingshown = $formfile->numoffiles; print '
';