From 1093e66d26183beee9ddc8e75fee6d9aedfa1f4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 May 2021 10:14:14 +0200 Subject: [PATCH] Update societe.class.php --- htdocs/societe/class/societe.class.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index d207c690a69..91059c7ecc1 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2560,14 +2560,16 @@ class Societe extends CommonObject } } $label .= '
'.$langs->trans('Email').': '.$this->email; - $phonelist = array(); - if ($this->phone) { - $phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', ' ', 'phone'); + if (!empty($this->phone) || !empty($this->fax)) { + $phonelist = array(); + if ($this->phone) { + $phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', ' ', 'phone'); + } + if ($this->fax) { + $phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', ' ', 'fax'); + } + $label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist); } - if ($this->fax) { - $phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', ' ', 'fax'); - } - $label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist); if (!empty($this->address)) { $label .= '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); }