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 '