diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 1fbbe2ecefa..7693ef9a4de 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -66,12 +66,13 @@ if ($id > 0 || ! empty($ref)) if ($cancel) $action =''; -// Action association d'un sousproduit +// Add subproduct to product if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->service->creer)) { $error=0; - for ($i=0; $i < GETPOST("max_prod", 'int'); $i++) + $maxprod = GETPOST("max_prod", 'int'); + for ($i=0; $i < $maxprod; $i++) { $qty = price2num(GETPOST("prod_qty_".$i, 'alpha'), 'MS'); if ($qty > 0)