From 2ba87e0d325dbe537ad4d357796565b9e7656be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 12 Nov 2025 15:33:56 +0100 Subject: [PATCH] add phone mobile of target (#36234) --- htdocs/core/lib/pdf.lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)) {