Skip to content

Commit

Permalink
define $code for all execution paths
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 authored Oct 9, 2018
1 parent 430f833 commit c3f07dd
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions htdocs/societe/class/societe.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1837,24 +1837,28 @@ function getNomUrl($withpicto=0, $option='', $maxlen=0, $notooltip=0, $save_last

if (! empty($conf->global->SOCIETE_ADD_REF_IN_LIST) && (!empty($withpicto)))
{
$code = '';
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 . ' - ';
) {
$code .= $this->code_client . ' - ';
}

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 . ' - ';
) {
$code .= $this->code_fournisseur . ' - ';
}

if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1)
$name =$code.' '.$name;
else
$name =$code;
if ($conf->global->SOCIETE_ADD_REF_IN_LIST == 1) {
$name = $code.' '.$name;
} else {
$name = $code;
}
}

if (!empty($this->name_alias)) $name .= ' ('.$this->name_alias.')';
Expand Down

0 comments on commit c3f07dd

Please sign in to comment.