Skip to content

Commit

Permalink
Fix missing link on bank account
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 17, 2018
1 parent 7dc552a commit 34c2fac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions htdocs/compta/bank/class/account.class.php
Expand Up @@ -1308,10 +1308,12 @@ function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1
$label .= '<br><b>' . $langs->trans('BankAccount') . ':</b> ' . $this->label;
$label .= '<br><b>' . $langs->trans('AccountNumber') . ':</b> ' . $this->number;
$label .= '<br><b>' . $langs->trans("AccountCurrency") . ':</b> ' . $this->currency_code;

if (!$user->rights->accounting->read || !empty($user->socid))
$option = 'nolink';


if (empty($user->rights->banque->lire) || !empty($user->socid))
{
$option = 'nolink';
}

if (! empty($conf->accounting->enabled))
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
Expand Down Expand Up @@ -1346,7 +1348,7 @@ function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1
$linkstart = '';
$linkend = '';
}

$result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), $this->picto, ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : '');
Expand Down

0 comments on commit 34c2fac

Please sign in to comment.