diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3
index 744202e25d0..473a4acb081 100644
--- a/htdocs/compta/index.php3
+++ b/htdocs/compta/index.php3
@@ -124,10 +124,19 @@ print "
";
print '| '.translate("Bills").' | ';
print "
\n";
-$sql = "SELECT count(*) FROM llx_facture WHERE paye = 0";
-if (valeur($sql)) {
- $var=!$var;
- print "| Non payées | ".valeur($sql)." |
";
+$sql = "SELECT facnumber, rowid FROM llx_facture WHERE paye = 0";
+if ( $db->query($sql) )
+{
+ $num = $db->num_rows();
+ $i = 0;
+
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object( $i);
+ $var=!$var;
+ print '| '.$obj->facnumber." |
";
+ $i++;
+ }
}
print "
";