Skip to content

Commit

Permalink
Add option no url
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed May 1, 2017
1 parent e58d2f4 commit 94b6984
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion htdocs/accountancy/class/accountingaccount.class.php
Expand Up @@ -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';
Expand Down Expand Up @@ -407,6 +408,13 @@ function getNomUrl($withpicto = 0, $withlabel = 0, $moretitle='',$notooltip=0)
$linkstart.=$linkclose.'>';
$linkend='</a>';

if ($nourl)
{
$linkstart = '';
$linkclose = '';
$linkend = '';
}

$label_link = length_accountg($this->account_number);
if ($withlabel) $label_link .= ' - ' . $this->label;

Expand Down

0 comments on commit 94b6984

Please sign in to comment.