New: Can link to transactions list of a bank account
This commit is contained in:
parent
966c1adeab
commit
8b70133797
@ -572,8 +572,8 @@ if ($account || $_GET["ref"])
|
|||||||
}
|
}
|
||||||
else if ($links[$key]['type']=='sc') {
|
else if ($links[$key]['type']=='sc') {
|
||||||
}
|
}
|
||||||
else {
|
else { // Show link with label $links[$key]['label']
|
||||||
//print ' - ';
|
if (! empty($objp->label) && ! empty($links[$key]['label'])) print ' - ';
|
||||||
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
||||||
if (preg_match('/^\((.*)\)$/i',$links[$key]['label'],$reg))
|
if (preg_match('/^\((.*)\)$/i',$links[$key]['label'],$reg))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -844,16 +844,25 @@ class Account extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
* @param withpicto Inclut le picto dans le lien
|
* @param withpicto Inclut le picto dans le lien
|
||||||
|
* @param mode ''=Link to card, 'transactions'=Link to transactions card
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0)
|
function getNomUrl($withpicto=0, $mode='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
|
if (empty($mode))
|
||||||
|
{
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$this->id.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
}
|
||||||
|
else if ($mode == 'transactions')
|
||||||
|
{
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$this->id.'">';
|
||||||
|
$lienfin='</a>';
|
||||||
|
}
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAccount"),'account').$lienfin.' ');
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowAccount"),'account').$lienfin.' ');
|
||||||
$result.=$lien.$this->label.$lienfin;
|
$result.=$lien.$this->label.$lienfin;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user