Code cleaner
This commit is contained in:
parent
03bb9786c3
commit
972b60fe4c
@ -1165,28 +1165,35 @@ class Societe extends CommonObject
|
||||
* \param maxlen Longueur max libelle
|
||||
* \return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='',$maxlen=0)
|
||||
function getNomUrl($withpicto=0,$option='customer',$maxlen=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
if ($this->client == 1)
|
||||
if ($option == 'customer')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">';
|
||||
if ($this->client == 1)
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
elseif($this->client == 2)
|
||||
{
|
||||
$lien= '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
}
|
||||
if ($option == 'supplier')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
elseif($this->client == 2)
|
||||
{
|
||||
$lien= '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
}
|
||||
|
||||
if ($option == 'compta')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$this->id.'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user