From 4c6fb5a8801a05ec492f10eceb31c0af4972148a Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Thu, 6 May 2021 23:04:27 +0200 Subject: [PATCH 1/4] Update pdf.php --- htdocs/admin/pdf.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 7d7b5e36a40..d16e7c694e5 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2012-2107 Juanjo Menent * Copyright (C) 2019 Ferran Marcet + * Copyright (C) 2021 Anthony Berton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -417,6 +418,17 @@ 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 sales representative + +print ''.$langs->trans("DOC_SHOW_FIRST_SALES_REP").''; +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); +} +print ''; + print ''; print ''; From 3de055bac2efb85566b6445b8e446bd2067485a9 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Wed, 11 Aug 2021 12:10:17 +0200 Subject: [PATCH 2/4] update --- htdocs/admin/pdf.php | 4 +++- htdocs/langs/en_US/admin.lang | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 8891fb5a4c4..4a42eb2bf23 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -420,7 +420,9 @@ print ''; // Show sales representative -print ''.$langs->trans("DOC_SHOW_FIRST_SALES_REP").''; +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 { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 55a0b0a34c3..6bd56b6ed49 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1994,6 +1994,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 picture on proposal line MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF NothingToSetup=There is no specific setup required for this module. @@ -2151,8 +2152,9 @@ 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 YouShouldSetThisToOff=You should set this to 0 or off -InstallAndUpgradeLockedBy=Install and upgrades are locked by the file %s \ No newline at end of file +InstallAndUpgradeLockedBy=Install and upgrades are locked by the file %s From 03ff75bccdfa5816638e81daaf8062fe7cab0bac Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 9 Sep 2021 06:29:33 +0000 Subject: [PATCH 3/4] Fixing style errors. --- htdocs/admin/pdf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 22fee77cdd5..ba06aadc8df 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -166,10 +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')) { + 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); } - + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); From 8adfc4fefe381afdac663fe68302f9eb6c63e13c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 8 Nov 2021 13:27:01 +0000 Subject: [PATCH 4/4] Fixing style errors. --- htdocs/admin/pdf.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 513fc7ae4af..30f097d7dd0 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -168,8 +168,8 @@ if ($action == 'update') { 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_USE_A')) { dolibarr_set_const($db, "PDF_USE_A", GETPOST('PDF_USE_A', 'alpha'), 'chaine', 0, '', $conf->entity); }