From 94b69844f2a57a021ac311b78a6285f1724c6081 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 1 May 2017 20:39:46 +0200 Subject: [PATCH] Add option no url --- htdocs/accountancy/class/accountingaccount.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index dfb29be6323f0..8bf7dfe0c44ea 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -366,11 +366,12 @@ function delete($user, $notrigger = 0) { * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $withlabel 0=No label, 1=Include label of account + * @param int $nourl 1=Disable url * @param string $moretitle Add more text to title tooltip * @param int $notooltip 1=Disable tooltip * @return string String with URL */ - function getNomUrl($withpicto = 0, $withlabel = 0, $moretitle='',$notooltip=0) + function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0) { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -407,6 +408,13 @@ function getNomUrl($withpicto = 0, $withlabel = 0, $moretitle='',$notooltip=0) $linkstart.=$linkclose.'>'; $linkend=''; + if ($nourl) + { + $linkstart = ''; + $linkclose = ''; + $linkend = ''; + } + $label_link = length_accountg($this->account_number); if ($withlabel) $label_link .= ' - ' . $this->label;