2
0
forked from Wavyzz/dolibarr

only one option

This commit is contained in:
BB2A Anthony Berton
2022-02-04 17:29:13 +01:00
parent b4fffc6a23
commit 0e1e65e180
3 changed files with 5 additions and 19 deletions

View File

@@ -574,25 +574,12 @@ print '</td></tr>';
// Show alias in thirdparty name
print '<tr class="oddeven"><td>'.$langs->trans("PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME").'</td><td>';
print '<tr class="oddeven"><td>'.$langs->trans("PDF_THIRDPARTY_NAME_TO_SHOW_IS").'</td><td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME', array(), null, 0, 0, 1);
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
$arrval = array('0' => '', '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);
}
// Invert alias and name thirdparty
if (!empty($conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME)) {
print '<tr class="oddeven"><td>'.$langs->trans("PDF_INVERT_ALIAS_NAME_THIRDPARTY").'</td><td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('PDF_INVERT_ALIAS_NAME_THIRDPARTY');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("PDF_INVERT_ALIAS_NAME_THIRDPARTY", $arrval, $conf->global->PDF_INVERT_ALIAS_NAME_THIRDPARTY);
}
}
// Show online payment link on invoices
print '<tr class="oddeven"><td>'.$langs->trans("PDF_SHOW_LINK_TO_ONLINE_PAYMENT").'</td><td>';

View File

@@ -392,9 +392,9 @@ function pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includeali
if ($thirdparty instanceof Societe) {
$socname .= $thirdparty->name;
if (($includealias || !empty($conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME)) && !empty($thirdparty->name_alias)) {
if (($includealias || $conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME) == 1 && !empty($thirdparty->name_alias)) {
$socname .= " - ".$thirdparty->name_alias;
if ($conf->global->PDF_INVERT_ALIAS_NAME_THIRDPARTY) {
if ($conf->global->PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME == 2) {
$socname = '';
$socname = $thirdparty->name_alias." - ".$thirdparty->name;
}

View File

@@ -2144,8 +2144,7 @@ EmailTemplate=Template for email
EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax
PDF_SHOW_PROJECT=Show project on document
ShowProjectLabel=Project Label
PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME = Include alias in thirdparty name
PDF_INVERT_ALIAS_NAME_THIRDPARTY = Invert name and alias
PDF_THIRDPARTY_NAME_TO_SHOW_IS = Include alias in thirdparty name
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_A=Gererate PDF documents with format PDF/A instead of defaut format PDF
FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book.