Skip to content

Commit

Permalink
Quick hack to solve missing alias name on doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 9, 2017
1 parent 9fc17d8 commit aa66676
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdocs/core/lib/pdf.lib.php
Expand Up @@ -345,16 +345,18 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
* @param Societe|Contact $thirdparty Contact or thirdparty
* @param Translate $outputlangs Output language
* @param int $includealias 1=Include alias name after name
* @return string
* @return string String with name of thirdparty (+ alias if requested)
*/
function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0)
{
global $conf;

// Recipient name
$socname = '';

if ($thirdparty instanceof Societe) {
$socname .= $thirdparty->name;
if ($includealias && !empty($thirdparty->name_alias)) {
if (($includealias || ! empty($conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME)) && !empty($thirdparty->name_alias)) {
$socname .= "\n".$thirdparty->name_alias;
}
} elseif ($thirdparty instanceof Contact) {
Expand Down

0 comments on commit aa66676

Please sign in to comment.