diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 7a3a3933cbc..b94a9aabf96 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -32,7 +32,12 @@ if (!$user->rights->banque->lire)
llxHeader();
-if (! strlen($_GET["num"]))
+
+// Récupère info du compte
+$acct = new Account($db);
+$acct->fetch($_GET["account"]);
+
+if (! isset($_GET["num"]))
{
/*
*
@@ -49,7 +54,7 @@ if (! strlen($_GET["num"]))
$sql = "SELECT distinct(b.num_releve) as numr";
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b WHERE fk_account = ".$_GET["account"]." ORDER BY numr DESC";
- $sql .= $db->plimit($limit + 1,$offset);
+ $sql .= $db->plimit($limit,$offset);
$result = $db->query($sql);
@@ -59,20 +64,24 @@ if (! strlen($_GET["num"]))
$numrows = $db->num_rows();
$i = 0;
- print_barre_liste("Relevés bancaires", $page, $PHP_SELF,"&account=$account",$sortfield,$sortorder,'',$numrows);
+ print_barre_liste("Relevés bancaires, compte : id."\">".$acct->label."", $page, $PHP_SELF,"&account=$account",$sortfield,$sortorder,'',$numrows);
print '
";
+ print "\n";
}
@@ -116,14 +125,12 @@ else
}
}
- $acct = new Account($db);
- $acct->fetch($_GET["account"]);
-
- print_titre('Releve numéro '.$_GET["num"].' compte : '.$acct->label.'');
+ print_titre('Relevé numéro '.$_GET["num"].', compte : '.$acct->label.'');
print "";
+ print " - id\">Relevé suivant ->";
+ print "";
print "";
+ print "\n";
}
$db->close();