From 9e1487fc6126237b300a6990f5c20c3522c7e270 Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 26 Apr 2013 12:44:21 +0200 Subject: [PATCH 1/3] Fix bug Pgsql --- htdocs/fourn/facture/impayees.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 467d02e8726..50b6637291c 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -143,8 +143,7 @@ if ($user->rights->fournisseur->facture->lire) { $sql .= " AND f.facnumber LIKE '%".GETPOST('sf_re')."%'"; } - $sql.= " GROUP BY f.facnumber, f.rowid, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.fk_statut, s.rowid, s.nom"; - + $sql.= " GROUP BY s.rowid, s.nom, f.rowid, f.facnumber, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement,f.paye, f.rowid, f.fk_statut"; $sql.= " ORDER BY "; $listfield=explode(',',$sortfield); foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.","; From 4ff5922a55dc987f9ab8a5ea7c16be664ec165bf Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 26 Apr 2013 12:53:13 +0200 Subject: [PATCH 2/3] Fix pgSQL bug --- htdocs/fourn/facture/impayees.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 50b6637291c..c515307663d 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -144,6 +144,7 @@ if ($user->rights->fournisseur->facture->lire) $sql .= " AND f.facnumber LIKE '%".GETPOST('sf_re')."%'"; } $sql.= " GROUP BY s.rowid, s.nom, f.rowid, f.facnumber, f.total_ht, f.total_ttc, f.datef, f.date_lim_reglement,f.paye, f.rowid, f.fk_statut"; + if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " ORDER BY "; $listfield=explode(',',$sortfield); foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.","; From b67faf1eb14560da9f66736048d70affcc2f7eae Mon Sep 17 00:00:00 2001 From: fhenry Date: Fri, 26 Apr 2013 13:01:42 +0200 Subject: [PATCH 3/3] Fix PgSQL --- htdocs/compta/facture/impayees.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 1a8ddd3b6a6..48c0f5c1e9e 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -227,7 +227,7 @@ if ($search_societe) $sql .= " AND s.nom LIKE '%".$search_societe."%'"; if ($search_montant_ht) $sql .= " AND f.total = '".$search_montant_ht."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$search_montant_ttc."'"; if (GETPOST('sf_ref')) $sql .= " AND f.facnumber LIKE '%".GETPOST('sf_ref') . "%'"; -$sql.= " GROUP BY s.nom,s.rowid,f.facnumber, f.increment, f.total, f.tva, f.total_ttc,f.datef, f.date_lim_reglement, f.rowid,f.fk_statut,f.type "; +$sql.= " GROUP BY s.nom, s.rowid, f.facnumber, f.increment, f.total, f.tva, f.total_ttc, f.datef, f.date_lim_reglement, f.paye, f.rowid, f.fk_statut, f.type "; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " ORDER BY "; $listfield=explode(',',$sortfield);