From 3940abe7c19744764df53eeb31f758a2f9e92dc2 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Sat, 7 Feb 2015 10:48:03 +0100 Subject: [PATCH] FIX: select DISTINCT for natural search on proposal list (in the same way it's done in invoices list) --- htdocs/comm/propal/list.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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';