From 26ccb79f24d6b1712672f8544e2b0585cc822502 Mon Sep 17 00:00:00 2001 From: MAxime Kohlhaas Date: Sat, 25 Oct 2014 19:13:13 +0200 Subject: [PATCH 1/2] Fix : product list was wrong on supplier invoice because fourn_id is not fetched --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index a51a6505416..353f053ebea 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -152,7 +152,7 @@ else { 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error' ); - $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1); + $form->select_produits_fournisseurs($object->fk_soc, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1); } echo ''; } From 374b761fdf3ad7013c671aa4c1c334da921597cf Mon Sep 17 00:00:00 2001 From: MAxime Kohlhaas Date: Sat, 25 Oct 2014 19:20:02 +0200 Subject: [PATCH 2/2] Fix : product list was wrong on supplier invoice because fourn_id is not fetched --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index a51a6505416..ed06bca8725 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -152,7 +152,7 @@ else { 'option_disabled' => 'addPredefinedProductButton', // html id to disable once select is done 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'error' ); - $form->select_produits_fournisseurs($object->fourn_id, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1); + $form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1); } echo ''; }