Can add more text into title shown by getNomUrl
This commit is contained in:
parent
e0109c019d
commit
0739942b7e
@ -711,9 +711,10 @@ class Facture extends CommonObject
|
||||
* @param string $option Where point the link
|
||||
* @param int $max Maxlength of ref
|
||||
* @param int $short 1=Return just URL
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @return string String with URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='',$max=0,$short=0)
|
||||
function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -724,9 +725,6 @@ class Facture extends CommonObject
|
||||
|
||||
if ($short) return $url;
|
||||
|
||||
$linkstart='<a href="'.$url.'">';
|
||||
$linkend='</a>';
|
||||
|
||||
$picto='bill';
|
||||
if ($this->type == 1) $picto.='r'; // Replacement invoice
|
||||
if ($this->type == 2) $picto.='a'; // Credit note
|
||||
@ -736,8 +734,13 @@ class Facture extends CommonObject
|
||||
if ($this->type == 1) $label=$langs->transnoentitiesnoconv("ShowInvoiceReplace").': '.$this->ref;
|
||||
if ($this->type == 2) $label=$langs->transnoentitiesnoconv("ShowInvoiceAvoir").': '.$this->ref;
|
||||
if ($this->type == 3) $label=$langs->transnoentitiesnoconv("ShowInvoiceDeposit").': '.$this->ref;
|
||||
if ($moretitle) $label.=' - '.$moretitle;
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object($label,$picto).$linkend);
|
||||
//$linkstart='<a href="'.$url.'" title="'.dol_escape_htmltag($label).'">';
|
||||
$linkstart='<a href="'.$url.'">';
|
||||
$linkend='</a>';
|
||||
|
||||
if ($withpicto) $result.=($linkstart.img_object(($max?dol_trunc($label,$max):$label),$picto).$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$linkstart.($max?dol_trunc($this->ref,$max):$this->ref).$linkend;
|
||||
return $result;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/facture.php
|
||||
* \file htdocs/compta/facture/list.php
|
||||
* \ingroup facture
|
||||
* \brief Page to create/see an invoice
|
||||
*/
|
||||
@ -131,7 +131,7 @@ if (! $sall) $sql = 'SELECT';
|
||||
else $sql = 'SELECT DISTINCT';
|
||||
$sql.= ' f.rowid as facid, f.facnumber, f.type, f.increment, f.total, f.total_ttc,';
|
||||
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
||||
$sql.= ' f.paye as paye, f.fk_statut,';
|
||||
$sql.= ' f.paye as paye, f.fk_statut, f.note,';
|
||||
$sql.= ' s.nom, s.rowid as socid';
|
||||
if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
@ -307,12 +307,13 @@ if ($resql)
|
||||
$facturestatic->id=$objp->facid;
|
||||
$facturestatic->ref=$objp->facnumber;
|
||||
$facturestatic->type=$objp->type;
|
||||
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$objp->note_public:$objp->note),1);
|
||||
$paiement = $facturestatic->getSommePaiement();
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
|
||||
print '<td class="nobordernopadding" nowrap="nowrap">';
|
||||
print $facturestatic->getNomUrl(1);
|
||||
print $facturestatic->getNomUrl(1,'',200,0,$notetoshow);
|
||||
print $objp->increment;
|
||||
print '</td>';
|
||||
|
||||
@ -322,7 +323,8 @@ if ($resql)
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$objp->facid;
|
||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
|
||||
@ -3076,7 +3076,7 @@ function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8')
|
||||
$temp = preg_replace($pattern,"",$temp);
|
||||
|
||||
// Supprime aussi les retours
|
||||
if ($removelinefeed) $temp=str_replace("\n"," ",$temp);
|
||||
if ($removelinefeed) $temp=str_replace(array("\r\n","\r","\n")," ",$temp);
|
||||
|
||||
// et les espaces doubles
|
||||
while(strpos($temp," "))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user