diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php
index bfc4451bbd2..365ce7f47a6 100644
--- a/htdocs/compta/paiement/cheque/fiche.php
+++ b/htdocs/compta/paiement/cheque/fiche.php
@@ -294,12 +294,17 @@ else
print "";
print "\n";
- print '
| '.$langs->trans('Date').' | '.dolibarr_print_date($remisecheque->date_bordereau).' |
';
+ print '| '.$langs->trans('DateCreation').' | '.dolibarr_print_date($remisecheque->date_bordereau,'day').' |
';
print '| '.$langs->trans('Account').' | ';
print $accountstatic->getNomUrl(1);
print ' |
';
+ // Nb of cheques
+ print '| '.$langs->trans('NbOfCheques').' | ';
+ print $remisecheque->nbcheque;
+ print ' |
';
+
print '| '.$langs->trans('Total').' | ';
print price($remisecheque->amount);
print ' |
';
diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php
index 54d8f67fd9e..9dd753a9ab7 100644
--- a/htdocs/compta/paiement/cheque/index.php
+++ b/htdocs/compta/paiement/cheque/index.php
@@ -96,12 +96,14 @@ else
print '';
-$sql = "SELECT bc.rowid,".$db->pdate("bc.date_bordereau")." as db, bc.amount,bc.number,";
-$sql.= " bc.statut, ba.label, ba.rowid as bid";
-$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc";
-$sql.= ",".MAIN_DB_PREFIX."bank_account as ba";
+$sql = "SELECT bc.rowid,".$db->pdate("bc.date_bordereau")." as db, bc.amount, bc.number,";
+$sql.= " bc.statut, bc.nbcheque,";
+$sql.= " ba.label, ba.rowid as bid";
+$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc,";
+$sql.= " ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= " WHERE ba.rowid=bc.fk_bank_account";
-$sql.= " ORDER BY bc.rowid DESC LIMIT 10;";
+$sql.= " ORDER BY bc.rowid";
+$sql.= " DESC LIMIT 10";
$resql = $db->query($sql);
@@ -112,6 +114,7 @@ if ($resql)
print ' | '.$langs->trans("CheckReceiptShort").' | ';
print ''.$langs->trans("Date")." | ";
print ''.$langs->trans("Account").' | ';
+ print ''.$langs->trans("NbOfCheques").' | ';
print ''.$langs->trans("Amount").' | ';
print ''.$langs->trans("Status").' | ';
print "\n";
@@ -132,6 +135,7 @@ if ($resql)
print ''.$checkdepositstatic->getNomUrl(1).' | ';
print ''.dolibarr_print_date($objp->db,'day').' | ';
print ''.$accountstatic->getNomUrl(1).' | ';
+ print ''.$objp->nbcheque.' | ';
print ''.price($objp->amount).' | ';
print ''.$checkdepositstatic->LibStatut($objp->statut,3).' | ';
diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php
index ac0d2d94c99..c45f028d154 100644
--- a/htdocs/compta/paiement/cheque/liste.php
+++ b/htdocs/compta/paiement/cheque/liste.php
@@ -17,7 +17,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
- * $Source$
*/
/**
@@ -53,7 +52,7 @@ $sortfield=$_GET["sortfield"];
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC";
-if (! $sortfield) $sortfield="bc.rowid";
+if (! $sortfield) $sortfield="bc.number";
$checkdepositstatic=new RemiseCheque($db);
$accountstatic=new Account($db);
@@ -65,7 +64,8 @@ $accountstatic=new Account($db);
llxHeader('',$langs->trans("ChequesReceipts"));
-$sql = "SELECT bc.rowid, bc.number, ".$db->pdate("bc.date_bordereau") ." as dp, bc.amount, bc.statut,";
+$sql = "SELECT bc.rowid, bc.number as ref, ".$db->pdate("bc.date_bordereau") ." as dp,";
+$sql.= " bc.nbcheque, bc.amount, bc.statut,";
$sql.= " ba.rowid as bid, ba.label";
$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc";
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba";
@@ -90,16 +90,20 @@ if ($resql)
print '