diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 5dceee7751d..04ad5a32fcc 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -482,7 +482,7 @@ if ($search_type_thirdparty && $search_type_thirdparty != '-1') $sql .= natural_ if (!empty($search_staff) && $search_staff != '-1') $sql .= natural_search("s.fk_effectif", $search_staff, 2); if ($search_level) $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3); if ($search_parent_name) $sql .= natural_search("s2.nom", $search_parent_name); -if ($search_stcomm != '' && $search_stcomm != -2) $sql .= natural_search("s.fk_stcomm", $search_stcomm, 2); +if ($search_stcomm != '' && $search_stcomm != -2) $sql .= natural_search("s.fk_stcomm", $search_stcomm, 1); if ($search_import_key) $sql .= natural_search("s.import_key", $search_import_key); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';