diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9bc3d51e7a1..d71d59b4270 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1471,13 +1471,16 @@ else /* Facture non trouvée */ print "Facture inexistante"; } - } else { + } + else + { + /*************************************************************************** * * * Mode Liste * * * ***************************************************************************/ - $page=$_GET["page"]; + $page = $_GET["page"]; $sortorder=$_GET["sortorder"]; $sortfield=$_GET["sortfield"]; $month=$_GET["month"]; @@ -1535,19 +1538,23 @@ else } $sql .= " f.rowid DESC "; - $sql .= $db->plimit($limit,$offset); + $sql .= $db->plimit($limit+1,$offset); $result = $db->query($sql); } + if ($result) { $num = $db->num_rows(); - if ($socidp) { - $soc = new Societe($db); - $soc->fetch($socidp); - } - print_barre_liste("Factures client".($socidp?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],"&socidp=$socidp",$sortfield,$sortorder,'',$num); + if ($socidp) + { + $soc = new Societe($db); + $soc->fetch($socidp); + } + + print_barre_liste("Factures client".($socidp?" $soc->nom":""),$page,"facture.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); + $i = 0; print '