From d94953c4d770cb7445ae71db31cd75d46ee874d5 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 17 Jun 2016 13:33:48 +0200 Subject: [PATCH 1/2] FIX bug with PgSQL on GROUP BY missing column --- htdocs/compta/facture/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2bd9ce1d8a4c4..0a88623010032 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -756,7 +756,8 @@ $sql.= ' f.datef, f.date_lim_reglement,'; $sql.= ' f.paye, f.fk_statut,'; $sql.= ' f.datec, f.tms,'; - $sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client'; + $sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code'; + $sql.= ' ,state.code_departement, state.nom'; } else { From 93417a08b34997985bc7c3fdeec6d7daa02ff908 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 17 Jun 2016 13:49:44 +0200 Subject: [PATCH 2/2] FIX : Add comment because accoutancy cannot work with PgSQL --- htdocs/accountancy/customer/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 64825d62cbb16..d5f913ae0dd72 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -184,6 +184,8 @@ print '' . $langs->trans("DecemberMin") . ''; print '' . $langs->trans("Total") . ''; + +//TODO : Cannot work with PGSQL !, Change that with php treatment rather than big SQL query $sql = "SELECT IF(aa.account_number IS NULL, 'Non pointe', aa.account_number) AS 'code comptable',"; $sql .= " IF(aa.label IS NULL, 'Non pointe', aa.label) AS 'Intitulé',"; $sql .= " ROUND(SUM(IF(MONTH(f.datef)=1,fd.total_ht,0)),2) AS 'Janvier',";