Disable option not complete
This commit is contained in:
parent
93ba5db6d3
commit
b9e376fb1d
@ -570,11 +570,13 @@ print '</td></tr>';
|
|||||||
|
|
||||||
// Show alias in thirdparty name
|
// Show alias in thirdparty name
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("PDF_THIRDPARTY_NAME_TO_SHOW_IS").'</td><td>';
|
/* Disabled because not yet completely implemented (does not work when we force a contact on object)
|
||||||
|
print '<tr class="oddeven"><td>'.$langs->trans("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").'</td><td>';
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
$arrval = array('0' => '', '1' => $langs->trans("THIRDPARTY_ALIAS"), '2' => $langs->trans("ALIAS_THIRDPARTY"));
|
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("THIRDPARTY_ALIAS"), '2' => $langs->trans("ALIAS_THIRDPARTY"));
|
||||||
print $form->selectarray("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval, $conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME);
|
print $form->selectarray("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", $arrval, getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME'));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// Show online payment link on invoices
|
// Show online payment link on invoices
|
||||||
|
|
||||||
|
|||||||
@ -391,16 +391,19 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali
|
|||||||
$socname = '';
|
$socname = '';
|
||||||
|
|
||||||
if ($thirdparty instanceof Societe) {
|
if ($thirdparty instanceof Societe) {
|
||||||
$socname .= $thirdparty->name;
|
$socname = $thirdparty->name;
|
||||||
if (($includealias || $conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME) == 1 && !empty($thirdparty->name_alias)) {
|
if (($includealias || getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) && !empty($thirdparty->name_alias)) {
|
||||||
$socname .= " - ".$thirdparty->name_alias;
|
if (getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME') == 2) {
|
||||||
if ($conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME == 2) {
|
|
||||||
$socname = '';
|
|
||||||
$socname = $thirdparty->name_alias." - ".$thirdparty->name;
|
$socname = $thirdparty->name_alias." - ".$thirdparty->name;
|
||||||
|
} else {
|
||||||
|
$socname = $thirdparty->name." - ".$thirdparty->name_alias;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($thirdparty instanceof Contact) {
|
} elseif ($thirdparty instanceof Contact) {
|
||||||
$socname = $thirdparty->socname;
|
$socname = $thirdparty->socname;
|
||||||
|
if (($includealias || getDolGlobalInt('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) && !empty($thirdparty->name_alias)) {
|
||||||
|
// TODO PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME not completely implemented
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new InvalidArgumentException('Parameter 1 $thirdparty is not a Societe nor Contact');
|
throw new InvalidArgumentException('Parameter 1 $thirdparty is not a Societe nor Contact');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2168,7 +2168,7 @@ EmailTemplate=Template for email
|
|||||||
EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
|
EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
|
||||||
PDF_SHOW_PROJECT=Show project on document
|
PDF_SHOW_PROJECT=Show project on document
|
||||||
ShowProjectLabel=Project Label
|
ShowProjectLabel=Project Label
|
||||||
PDF_THIRDPARTY_NAME_TO_SHOW_IS=Include alias in thirdparty name
|
PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME=Include alias in thirdparty name
|
||||||
THIRDPARTY_ALIAS=Name thirdparty - Alias thirdparty
|
THIRDPARTY_ALIAS=Name thirdparty - Alias thirdparty
|
||||||
ALIAS_THIRDPARTY=Alias thirdparty - Name thirdparty
|
ALIAS_THIRDPARTY=Alias thirdparty - Name thirdparty
|
||||||
PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
|
PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user