diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php
index 64825d62cbb..d5f913ae0dd 100644
--- a/htdocs/accountancy/customer/index.php
+++ b/htdocs/accountancy/customer/index.php
@@ -184,6 +184,8 @@ print '
' . $langs->trans("NovemberMin") . ' | ';
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',";
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 2bd9ce1d8a4..0a886230100 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -756,7 +756,8 @@ if (! $sall)
$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
{