From 34c2facff1a2cb65f9d9391c52d1167bda362296 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Jul 2018 18:16:30 +0200 Subject: [PATCH] Fix missing link on bank account --- htdocs/compta/bank/class/account.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 117621d919763..79b72a5a54c04 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1308,10 +1308,12 @@ function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1 $label .= '
' . $langs->trans('BankAccount') . ': ' . $this->label; $label .= '
' . $langs->trans('AccountNumber') . ': ' . $this->number; $label .= '
' . $langs->trans("AccountCurrency") . ': ' . $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'; @@ -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 : '');