From 6ee1c79f6f20e1d9b538ad2711eb8f0d1a6ed585 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 27 Mar 2017 18:26:24 +0200 Subject: [PATCH] SOCIETE_ADD_REF_IN_LIST more display case GetNomUrl 0 = only socname (usual) 1 = socname and code_customer and supplier (like before) 2 = only code customer 3 = only code supplier --- htdocs/societe/class/societe.class.php | 33 +++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index ed3fdad13c4..36f9e8c609b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1838,18 +1838,29 @@ class Societe extends CommonObject $name=$this->name?$this->name:$this->nom; - if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto))) - { - if (($this->client) && (! empty ( $this->code_client ))) { - $code = $this->code_client . ' - '; - } - if (($this->fournisseur) && (! empty ( $this->code_fournisseur ))) { - $code .= $this->code_fournisseur . ' - '; - } - $name =$code.' '.$name; - } + if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto))) + { + if (($this->client) && (! empty ( $this->code_client )) + && ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1 + || $conf->global->SOCIETE_ADD_REF_IN_LIST == 2 + ) + ) + $code = $this->code_client . ' - '; - if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')'; + if (($this->fournisseur) && (! empty ( $this->code_fournisseur )) + && ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1 + || $conf->global->SOCIETE_ADD_REF_IN_LIST == 3 + ) + ) + $code .= $this->code_fournisseur . ' - '; + + if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1) + $name =$code.' '.$name; + else + $name =$code; + } + + if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')'; $result=''; $label=''; $linkstart=''; $linkend='';