diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 8925a67d593..d360dc5207e 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -1243,9 +1243,10 @@ class Account extends CommonObject
*
* @param int $withpicto Include picto into link
* @param string $mode ''=Link to card, 'transactions'=Link to transactions card
+ * @param string $option ''=Show ref, 'reflabel'=Show ref+label
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0, $mode='')
+ function getNomUrl($withpicto=0, $mode='', $option='')
{
global $conf, $langs;
@@ -1279,7 +1280,7 @@ class Account extends CommonObject
}
if ($withpicto) $result.=($link.img_object($label, 'account', 'class="classfortooltip"').$linkend.' ');
- $result.=$link.$this->ref.$linkend;
+ $result.=$link.$this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : '').$linkend;
return $result;
}
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index f77ac86af7f..360a0d15a00 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -293,7 +293,7 @@ if ($result)
// Bank account
print '
| '.$langs->trans("Account").' | ';
print '';
- print $acct->getNomUrl(1,'transactions');
+ print $acct->getNomUrl(1,'transactions','reflabel');
print ' | ';
print '
';
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index ffadceafb2e..cfe05e28ec3 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -44,7 +44,7 @@ $action=GETPOST('action', 'alpha');
$id=GETPOST('account');
$ref=GETPOST('ref');
$dvid=GETPOST('dvid');
-$num=GETPOST('num');
+$numref=GETPOST('num');
// Security check
$fieldid = (! empty($ref)?$ref:$id);
@@ -116,7 +116,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($id > 0) $param.='&id='.urlencode($id);
-if (empty($num))
+if (empty($numref))
{
/*
* Vue liste tous releves confondus
@@ -176,14 +176,14 @@ if (empty($num))
while ($i < min($numrows,$conf->liste_limit))
{
$objp = $db->fetch_object($result);
- $var=!$var;
+
if (! isset($objp->numr))
{
//
}
else
{
- print '| '.$objp->numr.' | ';
+ print '
| '.$objp->numr.' | ';
// Calculate start amount
$sql = "SELECT sum(b.amount) as amount";
@@ -240,7 +240,7 @@ else
// Recherche valeur pour num = numero releve precedent
$sql = "SELECT DISTINCT(b.num_releve) as num";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
- $sql.= " WHERE b.num_releve < '".$db->escape($num)."'";
+ $sql.= " WHERE b.num_releve < '".$db->escape($numref)."'";
$sql.= " AND b.fk_account = ".$object->id;
$sql.= " ORDER BY b.num_releve DESC";
@@ -252,7 +252,7 @@ else
if ($numrows > 0)
{
$obj = $db->fetch_object($resql);
- $num = $obj->num;
+ $numref = $obj->num;
$found=true;
}
}
@@ -262,7 +262,7 @@ else
// Recherche valeur pour num = numero releve precedent
$sql = "SELECT DISTINCT(b.num_releve) as num";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
- $sql.= " WHERE b.num_releve > '".$db->escape($num)."'";
+ $sql.= " WHERE b.num_releve > '".$db->escape($numref)."'";
$sql.= " AND b.fk_account = ".$object->id;
$sql.= " ORDER BY b.num_releve ASC";
@@ -274,7 +274,7 @@ else
if ($numrows > 0)
{
$obj = $db->fetch_object($resql);
- $num = $obj->num;
+ $numref = $obj->num;
$found=true;
}
}
@@ -286,13 +286,16 @@ else
$mesprevnext='';
$mesprevnext.='';
- print load_fiche_titre($langs->trans("AccountStatement").' '.$num.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0, 'receipts'), $mesprevnext, 'title_bank.png');
+
+ $title=$langs->trans("AccountStatement").' '.$numref.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0, 'receipts');
+ print load_fiche_titre($title, $mesprevnext, 'title_bank.png');
+ //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'title_bank.png', 0, '', '', 0, 1);
print '
';
print "