diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php
index b95f73a399f..41215f98402 100644
--- a/htdocs/admin/pdf.php
+++ b/htdocs/admin/pdf.php
@@ -166,6 +166,10 @@ if ($action == 'update') {
dolibarr_set_const($db, "PDF_SHOW_LINK_TO_ONLINE_PAYMENT", GETPOST('PDF_SHOW_LINK_TO_ONLINE_PAYMENT', 'alpha'), 'chaine', 0, '', $conf->entity);
}
+ if (GETPOSTISSET('DOC_SHOW_FIRST_SALES_REP')) {
+ dolibarr_set_const($db, "DOC_SHOW_FIRST_SALES_REP", GETPOST('DOC_SHOW_FIRST_SALES_REP', 'alpha'), 'chaine', 0, '', $conf->entity);
+ }
+
if (GETPOSTISSET('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME')) {
dolibarr_set_const($db, "PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME", GETPOST('PDF_INCLUDE_ALIAS_IN_THIRDPARTY_NAME', 'alpha'), 'chaine', 0, '', $conf->entity);
}
@@ -568,6 +572,18 @@ print '
| '.$langs->trans("ShowDetailsInPDFPageFoot").' | selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS : 0));
print '
';
+// Show the first sales representative
+
+print '| '.$langs->trans("DOC_SHOW_FIRST_SALES_REP");
+print ' ('.$langs->trans("SalesRepresentativeInfo").')';
+print ' | ';
+if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('DOC_SHOW_FIRST_SALES_REP');
+} else {
+ $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
+ print $form->selectarray("DOC_SHOW_FIRST_SALES_REP", $arrval, $conf->global->DOC_SHOW_FIRST_SALES_REP);
+}
+
// Show alias in thirdparty name
/* Disabled because not yet completely implemented (does not work when we force a contact on object)
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 576b13961d6..281806d8cdb 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -2032,6 +2032,7 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
MAIN_PDF_MARGIN_TOP=Top margin on PDF
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
+DOC_SHOW_FIRST_SALES_REP=Show first sales representative
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add column for picture on proposal lines
MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Width of the column if a picture is added on lines
MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame
@@ -2215,6 +2216,7 @@ NoExternalModuleWithUpdate=No updates found for external modules
SwaggerDescriptionFile=Swagger API description file (for use with redoc for example)
YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead.
RandomlySelectedIfSeveral=Randomly selected if several pictures are available
+SalesRepresentativeInfo=For Proposals, Orders, Invoces.
DatabasePasswordObfuscated=Database password is obfuscated in conf file
DatabasePasswordNotObfuscated=Database password is NOT obfuscated in conf file
APIsAreNotEnabled=APIs modules are not enabled
|