From 18496f91591646b3bd254d665e2b3221950156f9 Mon Sep 17 00:00:00 2001 From: gauthier Date: Fri, 7 Oct 2016 09:19:10 +0200 Subject: [PATCH] FIX : params order --- htdocs/core/class/html.form.class.php | 7 ++++--- htdocs/product/stock/replenish.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 28bbe9e3545..5333e8de00a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2262,11 +2262,12 @@ class Form /** * Return list of suppliers prices for a product * - * @param int $productid Id of product - * @param string $htmlname Name of HTML field + * @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 d76bc0fe0b5..e7b56f236eb 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -612,7 +612,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) print ''; // Supplier - print ''. $form->select_product_fourn_price($prod->id, $fk_supplier, 'fourn'.$i).''; + print ''. $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier).''; print ''; }