diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 83390414905..0604c73d0fb 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -999,11 +999,12 @@ class Facture extends CommonInvoice * @param int $short 1=Return just URL * @param string $moretitle Add more text to title tooltip * @param int $notooltip 1=Disable tooltip + * @param int $addlinktonote 1=Add link to notes * @return string String with URL */ - function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip=0) + function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip=0,$addlinktonotes=0) { - global $langs, $conf, $user; + global $langs, $conf, $user, $form; if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips @@ -1058,6 +1059,21 @@ class Facture extends CommonInvoice if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend); if ($withpicto && $withpicto != 2) $result.=' '; if ($withpicto != 2) $result.=$linkstart.($max?dol_trunc($this->ref,$max):$this->ref).$linkend; + + if ($addlinktonotes) + { + $txttoshow=($user->societe_id>0?$this->note_public:$this->note_private); + if ($txttoshow) + { + $notetoshow=$langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow,1); + $result.=' '; + $result.=''.img_picto('','object_generic').''; + //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); + //$result.=''; + $result.=''; + } + } + return $result; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 48ed568e3f9..c38c8060bd7 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -866,30 +866,25 @@ if ($resql) $facturestatic->statut=$obj->fk_statut; $facturestatic->date_lim_reglement=$db->jdate($obj->datelimite); $facturestatic->type=$obj->type; + $facturestatic->note_public=$obj->note_public; + $facturestatic->note_private=$obj->note_private; print ''; if (! empty($arrayfields['f.facnumber']['checked'])) { print ''; - $notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1); $paiement = $facturestatic->getSommePaiement(); $remaintopay = $obj->total_ttc - $paiement; print ''; print ''; print '
'; - print $facturestatic->getNomUrl(1,'',200,0,$notetoshow); + print $facturestatic->getNomUrl(1,'',200,0,'',0,1); print $obj->increment; print ''; - if (! empty($obj->note_private)) - { - print ' '; - print ''.img_picto($langs->trans("ViewPrivateNote"),'object_generic').''; - print ''; - } $filename=dol_sanitizeFileName($obj->facnumber); $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->facid; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index d79eaae65f0..28b9517fe0b 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -802,7 +802,7 @@ class FormFile $out.= ''."\n"; if (! empty($file_list)) { - $out='