diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index d45718b5daf..33748025edc 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -141,7 +141,9 @@ if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; -$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client,'; +if (! $sall) $sql = 'SELECT'; +else $sql = 'SELECT DISTINCT'; +$sql.= ' s.rowid, s.nom, s.town, s.client, s.code_client,'; $sql.= ' p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= ' u.login';