diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 078db34b769..b458c807a74 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -622,12 +622,18 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t if (getDolGlobalString('MAIN_PDF_ADDALSOTARGETDETAILS') || preg_match('/targetwithdetails/', $mode)) { // Phone if (getDolGlobalString('MAIN_PDF_ADDALSOTARGETDETAILS') || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_phone/', $mode)) { - if (!empty($targetcompany->phone)) { + if (!empty($targetcompany->phone) || !empty($targetcompany->phone_mobile)) { $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Phone").": "; } if (!empty($targetcompany->phone)) { $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone); } + if (!empty($targetcompany->phone) && !empty($targetcompany->phone_mobile)) { + $stringaddress .= " / "; + } + if (!empty($targetcompany->phone_mobile)) { + $stringaddress .= $outputlangs->convToOutputCharset($targetcompany->phone_mobile); + } } // Fax if (getDolGlobalString('MAIN_PDF_ADDALSOTARGETDETAILS') || $mode == 'targetwithdetails' || preg_match('/targetwithdetails_fax/', $mode)) {