From 4bf1a619f23e58faed7e500f3c3250420f4ddf5b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 26 Oct 2007 09:37:44 +0000 Subject: [PATCH] Fix: modification suite au changement de fonctionnement des ref fournisseurs --- htdocs/fourn/product/liste.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 7a7d6e8ba59..e189796827d 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -37,6 +37,7 @@ $user->getrights('produit'); if (!$user->rights->produit->lire) accessforbidden(); $sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"]; +$sRefSupplier=isset($_GET["srefsupplier"])?$_GET["srefsupplier"]:$_POST["srefsupplier"]; $snom=isset($_GET["snom"])?$_GET["snom"]:$_POST["snom"]; $type=isset($_GET["type"])?$_GET["type"]:$_POST["type"]; @@ -58,9 +59,9 @@ if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) { $snom=""; } -if ($_GET["fourn_id"] > 0) +if ($_GET["fourn_id"] > 0 || $_POST["fourn_id"] > 0) { - $fourn_id = $_GET["fourn_id"]; + $fourn_id = isset($_GET["fourn_id"])?$_GET["fourn_id"]:$_POST["fourn_id"]; } if (isset($_REQUEST['catid'])) @@ -104,6 +105,10 @@ else { $sql .= " AND p.ref like '%".$sref."%'"; } + if ($sRefSupplier) + { + $sql .= " AND pf.ref_fourn like '%".$sRefSupplier."%'"; + } if ($snom) { $sql .= " AND p.label like '%".$snom."%'"; @@ -170,6 +175,7 @@ if ($resql) // Lignes des champs de filtre print '
'; + if ($fourn_id > 0) print ''; print ''; print ''; print '';