Merge pull request #24474 from erikvanberkum/develop

fix: Format thirdparty address label on pdf.
This commit is contained in:
Laurent Destailleur 2023-04-10 13:26:28 +02:00 committed by GitHub
commit 4158611ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -603,10 +603,12 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t
}
} else {
if (is_object($targetcompany)) {
$stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset(dol_format_address($targetcompany))."\n";
$stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset(dol_format_address($targetcompany));
// Country
if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) {
$stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code));
} else {
$stringaddress .= ($stringaddress ? "\n" : '');
}
if (!empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS) || preg_match('/targetwithdetails/', $mode)) {