diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index e0cc9c389f8..abcced738fb 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -84,8 +84,6 @@ if ($mode == 'search')
* Mode Liste
*
*/
-print_barre_liste("Liste des factures fournisseurs", $page, $PHP_SELF);
-
if ($sortorder == "")
{
$sortorder="DESC";
@@ -105,7 +103,7 @@ if ($socid)
$sql .= " AND s.idp = $socid";
}
-$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit, $offset);
+$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit+1, $offset);
$result = $db->query($sql);
@@ -122,7 +120,11 @@ if ($result)
{
$sortorder="DESC";
}
- print "
";
+
+ print_barre_liste("Liste des factures fournisseurs", $page, $PHP_SELF,'', $sortfield, $sortorder,'',$num);
+
+
+ print '';
print '';
print '| Numéro | ';
print '';
@@ -141,19 +143,19 @@ if ($result)
print ' | Payé | ';
print "
\n";
$var=True;
- while ($i < $num)
+ while ($i < min($num,$limit))
{
- $obj = $db->fetch_object( $i);
-
+ $obj = $db->fetch_object($i);
$var=!$var;
- print "";
- print "| facid\">$obj->facnumber | \n";
- print "".strftime("%d %b %Y",$obj->datef)." | \n";
- print ''.stripslashes("$obj->libelle").' | ';
- print "socid\">$obj->nom | \n";
- print ''.price($obj->total_ht).' | ';
- print ''.price($obj->total_ttc).' | ';
+ print "
";
+ print "| facid\">".img_file()."\n";
+ print " facid\">$obj->facnumber | \n";
+ print "".strftime("%d %b %Y",$obj->datef)." | \n";
+ print ''.stripslashes("$obj->libelle").' | ';
+ print "socid\">$obj->nom | \n";
+ print ''.price($obj->total_ht).' | ';
+ print ''.price($obj->total_ttc).' | ';
print ''.($obj->paye||$obj->total_ht==0?"":"").($obj->total_ht==0?"brouillon":$yn[$obj->paye]).($obj->paye||$obj->total_ht==0?"":"").' | ';
diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php
index 61e77900f0e..61a3c9d6f61 100644
--- a/htdocs/fourn/index.php
+++ b/htdocs/fourn/index.php
@@ -153,7 +153,7 @@ if ($result)
{
$sortorder="DESC";
}
- print "";
+ print '';
print '| ';
print_liste_field_titre("Société",$PHP_SELF,"s.nom");
print " | Ville | ";