diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a96fee522b3..949b586e940 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -444,8 +444,17 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if (!empty($targetcontact->address)) { $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcontact)); - }else { - $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($targetcompany)); + } else { + $companytouseforaddress = $targetcompany; + + // Contact on a thirdparty that is a different thirdparty than the thirdparty of object + if ($targetcontact->socid > 0 && $targetcontact->socid != $targetcompany->id) + { + $targetcontact->fetch_thirparty(); + $companytouseforaddress = $targetcontact->thirdparty; + } + + $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($companytouseforaddress)); } // Country if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) { diff --git a/htdocs/product/dynamic_price/class/index.html b/htdocs/product/dynamic_price/class/index.html new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/product/dynamic_price/class/index.html @@ -0,0 +1 @@ + diff --git a/htdocs/product/dynamic_price/index.html b/htdocs/product/dynamic_price/index.html new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/product/dynamic_price/index.html @@ -0,0 +1 @@ +