Skip to content

Commit

Permalink
Merge pull request #5367 from atm-florian/develop
Browse files Browse the repository at this point in the history
FIX bug with PgSQL on GROUP BY missing column
  • Loading branch information
eldy committed Jun 18, 2016
2 parents 94b7e17 + 93417a0 commit 4a64271
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions htdocs/accountancy/customer/index.php
Expand Up @@ -184,6 +184,8 @@
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';


//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',";
Expand Down
3 changes: 2 additions & 1 deletion htdocs/compta/facture/list.php
Expand Up @@ -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
{
Expand Down

0 comments on commit 4a64271

Please sign in to comment.