diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index ab25895b561..455db14e3ed 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -906,9 +906,9 @@ if ($resql)
print '';
}
// Town
- if (! empty($arrayfields['s.town']['checked'])) print '
| ';
+ if (! empty($arrayfields['s.town']['checked'])) print ' | ';
// Zip
- if (! empty($arrayfields['s.zip']['checked'])) print ' | ';
+ if (! empty($arrayfields['s.zip']['checked'])) print ' | ';
// State
if (! empty($arrayfields['state.nom']['checked']))
{
@@ -951,14 +951,14 @@ if ($resql)
{
// Amount
print '';
- print '';
+ print '';
print ' | ';
}
if (! empty($arrayfields['c.total_vat']['checked']))
{
// Amount
print '';
- print '';
+ print '';
print ' | ';
}
if (! empty($arrayfields['c.total_ttc']['checked']))
diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php
index b07e919849a..bb56c494854 100644
--- a/htdocs/compta/bank/bankentries.php
+++ b/htdocs/compta/bank/bankentries.php
@@ -429,7 +429,7 @@ if ($id > 0 || ! empty($ref))
if ($object->canBeConciliated() > 0) {
// If not cash account and can be reconciliate
if ($user->rights->banque->consolidate) {
- print ''.$langs->trans("Conciliate").'';
+ print ''.$langs->trans("Conciliate").'';
} else {
print ''.$langs->trans("Conciliate").'';
}
@@ -511,7 +511,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$nbtotalofpages = ceil($nbtotalofrecords/$limit);
}
-if (($id > 0 || ! empty($ref)) && GETPOST("page",'int') === '')
+if (($id > 0 || ! empty($ref)) && ((string) $page == ''))
{
// We open a list of transaction of a dedicated account and no page was set by defaut
// We force on last page.
@@ -519,6 +519,13 @@ if (($id > 0 || ! empty($ref)) && GETPOST("page",'int') === '')
$offset = $limit * $page;
if ($page < 0) $page = 0;
}
+if ($page >= $nbtotalofpages)
+{
+ // If we made a search and result has low page than the page number we were on
+ $page = ($nbtotalofpages -1);
+ $offset = $limit * $page;
+ if ($page < 0) $page = 0;
+}
if (! empty($search_ref)) $mode_balance_ok=false;
if (! empty($req_nb)) $mode_balance_ok=false;
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 8c694a949a3..ddd86e414fa 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -65,16 +65,29 @@ if ($user->rights->banque->consolidate && $action == 'dvprev' && ! empty($dvid))
}
-$sortfield = GETPOST('sortfield', 'alpha');
-$sortorder = GETPOST('sortorder', 'alpha');
-$page = GETPOST('page', 'int');
+$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
+$sortfield = GETPOST("sortfield",'alpha');
+$sortorder = GETPOST("sortorder",'alpha');
+$page = GETPOST("page",'int');
+$pageplusone = GETPOST("pageplusone",'int');
+if ($pageplusone) $page = $pageplusone - 1;
if ($page == -1) { $page = 0; }
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="s.nom";
-$offset = $conf->liste_limit * $page;
-$pageprev = $page - 1;
-$pagenext = $page + 1;
+$object = new Account($db);
+if ($id > 0 || ! empty($ref))
+{
+ $result=$object->fetch($id, $ref);
+ $account = $object->id; // Force the search field on id of account
+}
+
+
+// Initialize technical object to manage context to save list fields
+$contextpage='banktransactionlist'.(empty($object->ref)?'':'-'.$object->id);
/*
@@ -96,12 +109,12 @@ $bankstatic=new Account($db);
$banklinestatic=new AccountLine($db);
$remisestatic = new RemiseCheque($db);
-// Load account
-$object = new Account($db);
-if ($id > 0 || ! empty($ref))
-{
- $object->fetch($id, $ref);
-}
+// Must be before button action
+$param='';
+if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+if ($id > 0) $param.='&id='.urlencode($id);
+
if (empty($num))
{
@@ -138,7 +151,7 @@ if (empty($num))
if ($object->canBeConciliated() > 0) {
// If not cash account and can be reconciliate
if ($user->rights->banque->consolidate) {
- print ''.$langs->trans("Conciliate").'';
+ print ''.$langs->trans("Conciliate").'';
} else {
print ''.$langs->trans("Conciliate").'';
}
@@ -216,7 +229,7 @@ if (empty($num))
else
{
/**
- * Affiche liste ecritures d'un releve
+ * Show list of bank statements
*/
$ve=$_GET["ve"];