diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php
index 87f17b36050..744f5c48773 100644
--- a/htdocs/societe.class.php
+++ b/htdocs/societe.class.php
@@ -1165,34 +1165,41 @@ 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 = '';
+ if ($this->client == 1)
+ {
+ $lien = '';
+ $lienfin='';
+ }
+ elseif($this->client == 2)
+ {
+ $lien= '';
+ $lienfin='';
+ }
+ else
+ {
+ $lien = '';
+ $lienfin='';
+ }
+ }
+ if ($option == 'supplier')
+ {
+ $lien = '';
$lienfin='';
}
- elseif($this->client == 2)
- {
- $lien= '';
- $lienfin='';
- }
- else
- {
- $lien = '';
- $lienfin='';
- }
-
if ($option == 'compta')
{
$lien = '';
$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;
return $result;