forked from Wavyzz/dolibarr
Fix: N'ajoute les points de suspensions des chaines tronques que si la chaine a effectivement t tronque.
This commit is contained in:
@@ -240,7 +240,7 @@ if ( $societe->fetch($socid) )
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
print '<a href="facture/fiche.php?facid='.$obj->rowid.'">';
|
||||
print img_object($langs->trans("ShowBill"),"bill")." ".$obj->facnumber.'</a> '.substr($obj->libelle,0,40).'...</td>';
|
||||
print img_object($langs->trans("ShowBill"),"bill")." ".$obj->facnumber.'</a> '.dolibarr_trunc($obj->libelle,40).'</td>';
|
||||
print "<td align=\"right\" width=\"80\">".dolibarr_print_date($obj->df)."</td>";
|
||||
print '<td align="right">'.$obj->amount.'</td>';
|
||||
$fac = new FactureFournisseur($db);
|
||||
|
||||
@@ -348,6 +348,17 @@ function dolibarr_print_phone($phone,$country="FR")
|
||||
return $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Tronque une chaine <20> une taille donn<6E>e en ajoutant les points de suspension si cela d<>passe
|
||||
\param string Chaine <20> tronquer
|
||||
\param size Longueur max de la chaine
|
||||
\return string Chaine tronqu<71>e
|
||||
*/
|
||||
function dolibarr_trunc($string,$size=40)
|
||||
{
|
||||
if (sizeof($string) > $size) return substr($string,0,$size).'...';
|
||||
else return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Affiche logo propre <20> une notion (fonction g<>n<EFBFBD>rique)
|
||||
|
||||
Reference in New Issue
Block a user