Merge pull request #17528 from bb2a/phone_head_document

Add phone and address in popup Thirdparty info
This commit is contained in:
Laurent Destailleur 2021-05-17 10:16:49 +02:00 committed by GitHub
commit 21896370a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2570,7 +2570,19 @@ class Societe extends CommonObject
}
}
$label .= '<br><b>'.$langs->trans('Email').':</b> '.$this->email;
if (!empty($this->country_code)) {
if (!empty($this->phone) || !empty($this->fax)) {
$phonelist = array();
if ($this->phone) {
$phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', '&nbsp', 'phone');
}
if ($this->fax) {
$phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', '&nbsp', 'fax');
}
$label .= '<br><b>'.$langs->trans('Phone').':</b> '.implode('&nbsp;', $phonelist);
}
if (!empty($this->address)) {
$label .= '<br><b>'.$langs->trans("Address").':</b> '.dol_format_address($this, 1, ' ', $langs); // Address + country
} elseif (!empty($this->country_code)) {
$label .= '<br><b>'.$langs->trans('Country').':</b> '.$this->country_code;
}
if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) {