From 1a55159e35070bdb1bd0eeb486837af1aea7bbd8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Aug 2015 14:59:46 +0200 Subject: [PATCH] Fix filter on prospect status --- htdocs/comm/prospect/list.php | 12 ++++++------ htdocs/core/class/html.form.class.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 6f35709ccfb..e6227dad896 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -150,7 +150,7 @@ $search_categ = GETPOST('search_categ','int'); // If the internal user must only see his prospect, force searching by him if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; -// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state) +// List of available states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state) $sts = array(-1,0,1,2,3); @@ -235,7 +235,7 @@ $sql.= " AND s.client IN (2, 3)"; $sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; if ($socid) $sql.= " AND s.rowid = " .$socid; -if ($search_stcomm != '') $sql.= natural_search("s.fk_stcomm",$search_stcomm,2); +if ($search_stcomm != '' && $search_stcomm != -2) $sql.= natural_search("s.fk_stcomm",$search_stcomm,2); if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; @@ -376,13 +376,13 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -490,7 +490,7 @@ if ($resql) print $prospectstatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']); print ""; - print ''; + print ''; foreach($prospectstatic->cacheprospectstatus as $key => $val) { $titlealt='default'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7efae8effc3..0ab009d9957 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4455,7 +4455,7 @@ class Form { $textforempty=' '; if (! empty($conf->use_javascript_ajax)) $textforempty=' '; // If we use ajaxcombo, we need   here to avoid to have an empty element that is too small. - $out.=''."\n"; + $out.=''."\n"; // id is -2 because -1 is already "do not contact" } if (is_array($array))