Fix show customer code only if customer in company tooltip

This commit is contained in:
Laurent Destailleur 2018-10-25 17:25:36 +02:00
parent 1ba716b82c
commit 094bcc519f

View File

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