diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php
index 9b671c50eb1..c77bfedce60 100644
--- a/htdocs/compta/bank/rappro.php
+++ b/htdocs/compta/bank/rappro.php
@@ -45,6 +45,11 @@ if (! $user->rights->banque->consolidate) accessforbidden();
$action=GETPOST('action', 'alpha');
$id=GETPOST('account', 'int');
+$sortfield = GETPOST("sortfield",'alpha');
+$sortorder = GETPOST("sortorder",'alpha');
+if (! $sortorder) $sortorder="ASC";
+if (! $sortfield) $sortfield="dateo";
+
/*
* Actions
@@ -147,7 +152,7 @@ $sql.= ", bc.ref";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
$sql.= " WHERE rappro=0 AND fk_account=".$acct->id;
-$sql.= " ORDER BY dateo ASC";
+$sql.= " ORDER BY $sortfield $sortorder";
$sql.= " LIMIT 1000"; // Limit to avoid page overload
/// ajax adjust value date
@@ -231,17 +236,21 @@ if ($resql)
print '
';
- print '
| '.$langs->trans("DateOperationShort").' | '; - print ''.$langs->trans("DateValueShort").' | '; - print ''.$langs->trans("Type").' | '; - print ''.$langs->trans("Description").' | '; - print ''.$langs->trans("Debit").' | '; - print ''.$langs->trans("Credit").' | '; - print ''.$langs->trans("Action").' | '; - print ''.$langs->trans("ToConciliate").' | '; - print "