diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d61804f1c0af2a5281e0746006e60dc0d212aee9..871f6a2d2091d6f1ea539925d6489680c9b582ce 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2340,11 +2340,12 @@ class Form /** * Return list of suppliers prices for a product * - * @param int $productid Id of product - * @param string $htmlname Name of HTML field - * @return string|null + * @param int $productid Id of product + * @param string $htmlname Name of HTML field + * @param int $selected_supplier Pre-selected supplier if more than 1 result + * @return void */ - function select_product_fourn_price($productid, $selected_supplier='', $htmlname='productfournpriceid') + function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') { global $langs,$conf; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index bb447a8dfc0fd4f6b9005746a33622b0b89507a1..96dd647d561020dd21d8990418b31dc4280e5519 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -644,7 +644,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) print '<td align="right"><input type="text" size="4" name="tobuy'.$i.'" value="'.$stocktobuy.'"></td>'; // Supplier - print '<td align="right">'. $form->select_product_fourn_price($prod->id, $fk_supplier, 'fourn'.$i).'</td>'; + print '<td align="right">'. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).'</td>'; print '</tr>'; }