Merge pull request #5551 from marcosgdf/bug-5549
FIX #5549 getNomUrl tooltips show Order info even if user has no rights to read them
This commit is contained in:
commit
597f5dae15
@ -3071,7 +3071,7 @@ class Commande extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
|
|
||||||
@ -3081,17 +3081,29 @@ class Commande extends CommonOrder
|
|||||||
if ($short) return $url;
|
if ($short) return $url;
|
||||||
|
|
||||||
$picto = 'order';
|
$picto = 'order';
|
||||||
$label = '<u>' . $langs->trans("ShowOrder") . '</u>';
|
$label = '';
|
||||||
if (! empty($this->ref))
|
|
||||||
$label .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
if ($user->rights->commande->lire) {
|
||||||
if (! empty($this->ref_client))
|
$label = '<u>'.$langs->trans("ShowOrder").'</u>';
|
||||||
$label.= '<br><b>' . $langs->trans('RefCustomer') . ':</b> ' . $this->ref_client;
|
if (!empty($this->ref)) {
|
||||||
if (! empty($this->total_ht))
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
|
}
|
||||||
if (! empty($this->total_tva))
|
if (!empty($this->ref_client)) {
|
||||||
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
|
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||||
if (! empty($this->total_ttc))
|
}
|
||||||
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
|
if (!empty($this->total_ht)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_tva)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
if (!empty($this->total_ttc)) {
|
||||||
|
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
|
||||||
|
$conf->currency);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user