Skip to content

Commit

Permalink
Merge pull request #9718 from frederic34/patch-9
Browse files Browse the repository at this point in the history
define $code for all execution paths
  • Loading branch information
eldy authored Oct 12, 2018
2 parents 817920f + c3f07dd commit 2fdc1a9
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 2fdc1a9

Please sign in to comment.