Fix: add type of canvas if exist

This commit is contained in:
Regis Houssin 2010-10-29 15:10:33 +00:00
parent efdcccfa5f
commit cd71917531

View File

@ -1296,26 +1296,26 @@ class Societe extends CommonObject
{ {
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;
$lienfin='</a>';
} }
elseif($this->client == 2) elseif($this->client == 2)
{ {
$lien= '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$this->id;
$lienfin='</a>';
} }
} }
if ($option == 'supplier') if ($option == 'supplier')
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$this->id;
$lienfin='</a>';
} }
if (empty($lien)) if (empty($lien))
{ {
$lien = '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$this->id.'">'; $lien = '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$this->id;
$lienfin='</a>';
} }
// Add type of canvas
$lien.=(!empty($this->canvas)?'&amp;canvas='.$this->canvas:'').'">';
$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?dol_trunc($this->nom,$maxlen):$this->nom).$lienfin; $result.=$lien.($maxlen?dol_trunc($this->nom,$maxlen):$this->nom).$lienfin;