diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php
index 8a6f4f051a8..9f0a6818cae 100644
--- a/htdocs/compta/resultat/index.php
+++ b/htdocs/compta/resultat/index.php
@@ -81,10 +81,10 @@ print '
| '.price($total).' |
';
*
*
*/
-$sql = "SELECT s.nom,sum(f.total_ht) as amount";
+$sql = "SELECT s.nom,s.idp,sum(f.total_ht) as amount";
$sql .= " FROM llx_societe as s,llx_facture_fourn as f WHERE f.fk_soc = s.idp";
-$sql .= " GROUP BY s.nom ASC";
+$sql .= " GROUP BY s.nom ASC, s.idp";
print '| Frais |
';
$subtotal = 0;
@@ -100,7 +100,7 @@ if ($result) {
$var=!$var;
print "|   | ";
- print "Factures $objp->nom | \n";
+ print "Factures idp."\">$objp->nom | \n";
print "".price($objp->amount)." | \n";