Code cleaner
This commit is contained in:
parent
03bb9786c3
commit
972b60fe4c
@ -1165,34 +1165,41 @@ 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 ($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>';
|
$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')
|
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.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$this->nom,'company').$lienfin.' ');
|
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCompany").': '.$this->nom,'company').$lienfin.' ');
|
||||||
$result.=$lien.($maxlen?dolibarr_trunc($this->nom,$maxlen):$this->nom).$lienfin;
|
$result.=$lien.($maxlen?dolibarr_trunc($this->nom,$maxlen):$this->nom).$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user