diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index cb000b35c36..7c7e037f04c 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -285,7 +285,7 @@ if ($conf->societe->enabled && $user->rights->societe->lire) $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (1, 2, 3)"; - $sql.= " AND s.entity IN (".getEntity(societe, 1).")"; + $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid) $sql.= " AND s.rowid = $socid"; $sql .= " ORDER BY s.tms DESC";