From 0bead55836f87ea1a22724c96c3b9765a3cd9cb7 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Mon, 9 Aug 2021 18:11:36 +0200 Subject: [PATCH] ok --- htdocs/admin/pdf_other.php | 9 +++++++++ htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- htdocs/langs/en_US/admin.lang | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index ed14f2ac119..2866240e87d 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -103,6 +103,15 @@ if ($conf->use_javascript_ajax) { } print ''; +print ''.$langs->trans("PDF_NO_CODE_CLIENT"); +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_NO_CODE_CLIENT'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("PDF_NO_CODE_CLIENT", $arrval, $conf->global->PDF_NO_CODE_CLIENT); +} +print ''; /* print ''.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; if ($conf->use_javascript_ajax) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index b56fbc758db..e1455da3b20 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1523,7 +1523,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : ".dol_print_date($object->fin_validite, "day", false, $outputlangs, true), '', 'R'); - if ($object->thirdparty->code_client) { + if ($object->thirdparty->code_client && empty($conf->global->PDF_NO_CODE_CLIENT)) { $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 98c9e954ac2..674a2926023 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1992,6 +1992,7 @@ 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 MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line +PDF_NO_CODE_CLIENT=Do not display customer code MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups