Code cleaner

This commit is contained in:
Laurent Destailleur 2008-10-19 20:41:23 +00:00
parent 03bb9786c3
commit 972b60fe4c

View File

@ -1165,12 +1165,14 @@ class Societe extends CommonObject
* \param maxlen Longueur max libelle * \param maxlen Longueur max libelle
* \return string Chaine avec URL * \return string Chaine avec URL
*/ */
function getNomUrl($withpicto=0,$option='',$maxlen=0) function getNomUrl($withpicto=0,$option='customer',$maxlen=0)
{ {
global $langs; global $langs;
$result=''; $result='';
if ($option == 'customer')
{
if ($this->client == 1) if ($this->client == 1)
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">';
@ -1186,7 +1188,12 @@ class Societe extends CommonObject
$lien = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">';
$lienfin='</a>'; $lienfin='</a>';
} }
}
if ($option == 'supplier')
{
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id.'">';
$lienfin='</a>';
}
if ($option == 'compta') if ($option == 'compta')
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$this->id.'">';