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 '
';
- print ''."\n";
- 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 "
\n";
+ print '';
+ print ''."\n";
+ $paramlist='';
+ $paramlist.="&account=".$acct->id;
+ print '';
+ print ''."\n";
+ print_liste_field_titre($langs->trans("DateOperationShort"),$_SERVER["PHP_SELF"],"b.dateo","",$paramlist,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("DateValueShort"),$_SERVER["PHP_SELF"],"b.datev","",$paramlist,'align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"b.fk_type","",$paramlist,'align="left"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"b.label","",$paramlist,'align="left"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Debit"),$_SERVER["PHP_SELF"],"b.amount","",$paramlist,' width="60 align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Credit"),$_SERVER["PHP_SELF"],"b.amount","",$paramlist,' width="60 align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"","",$paramlist,' width="80 align="center"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("ToConciliate"),$_SERVER["PHP_SELF"],"","",$paramlist,' align="center" width="80" ',$sortfield,$sortorder);
+ print "
\n";
$i = 0;
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index 9e81180c4fe..62f8c1b6717 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -971,6 +971,17 @@ class Paiement extends CommonObject
$result='';
$label = $langs->trans("ShowPayment").': '.$this->ref;
+ $arraybill = $this->getBillsArray();
+ if (count($arraybill) >0)
+ {
+ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+ $facturestatic=new Facture($this->db);
+ foreach ($arraybill as $billid)
+ {
+ $facturestatic->fetch($billid);
+ $label .='
'.$facturestatic->getNomUrl(1).' '.$facturestatic->getLibStatut(2,1);
+ }
+ }
$link = '';
$linkend='';