From 88db3da002e3f2c1a2f2c50f14ffe8675473acde Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 5 Dec 2012 19:51:25 +0100 Subject: [PATCH] allowing product search by supplier ref --- htdocs/fourn/product/liste.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 943afb272a9..5661e136b6f 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2012 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -99,6 +100,10 @@ if ($_POST["mode"] == 'search') { $sql .= " AND (p.ref LIKE '%".$_POST["sall"]."%'"; $sql .= " OR p.label LIKE '%".$_POST["sall"]."%')"; + if ($sRefSupplier) + { + $sql .= " AND ppf.ref_fourn LIKE '%".$sRefSupplier."%'"; + } } else {