diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index c91593b079f..a89e242898c 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2098,11 +2098,11 @@ class Societe extends CommonObject
if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid5') !== false) $label.= '
' . $langs->trans('ProfId5'.$this->country_code) . ': '. $this->idprof5;
if (strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'profid6') !== false) $label.= '
' . $langs->trans('ProfId6'.$this->country_code) . ': '. $this->idprof6;
}
- if (! empty($this->code_client) && $this->client)
+ if (! empty($this->code_client) && ($this->client == 1 || $this->client == 3))
$label.= '
' . $langs->trans('CustomerCode') . ': '. $this->code_client;
if (! empty($this->code_fournisseur) && $this->fournisseur)
$label.= '
' . $langs->trans('SupplierCode') . ': '. $this->code_fournisseur;
- if (! empty($conf->accounting->enabled) && $this->client)
+ if (! empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3))
$label.= '
' . $langs->trans('CustomerAccountancyCode') . ': '. ($this->code_compta ? $this->code_compta : $this->code_compta_client);
if (! empty($conf->accounting->enabled) && $this->fournisseur)
$label.= '
' . $langs->trans('SupplierAccountancyCode') . ': '. $this->code_compta_fournisseur;