From b45a57060f5175a20226e0b1808164b5d9081dc4 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Wed, 11 Aug 2021 12:36:16 +0200
Subject: [PATCH] const_and_other_doc
---
htdocs/admin/pdf.php | 6 +++---
htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +-
htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 2 +-
htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +-
htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +-
htdocs/langs/en_US/admin.lang | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php
index 8d26d30131e..8db10aa3034 100644
--- a/htdocs/admin/pdf.php
+++ b/htdocs/admin/pdf.php
@@ -375,13 +375,13 @@ print '';
//
-print '
| '.$langs->trans("MAIN_PDF_NO_CUSTOMER_CODE");
+print ' |
| '.$langs->trans("DOC_SHOW_CUSTOMER_CODE");
print ' | ';
if ($conf->use_javascript_ajax) {
- print ajax_constantonoff('MAIN_PDF_NO_CUSTOMER_CODE');
+ print ajax_constantonoff('DOC_SHOW_CUSTOMER_CODE');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
- print $form->selectarray("MAIN_PDF_NO_CUSTOMER_CODE", $arrval, $conf->global->MAIN_PDF_NO_CUSTOMER_CODE);
+ print $form->selectarray("DOC_SHOW_CUSTOMER_CODE", $arrval, $conf->global->DOC_SHOW_CUSTOMER_CODE);
}
print ' |
';
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index c440cbf1cba..c86567db370 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -657,7 +657,7 @@ class pdf_strato extends ModelePDFContract
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_contrat, "day", false, $outputlangs, true), '', 'R');
- if ($object->thirdparty->code_client) {
+ if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && $object->thirdparty->code_client) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 79ceb166eed..621b20e624f 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -971,7 +971,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R');
}
- if (!empty($object->thirdparty->code_client)) {
+ if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && !empty($object->thirdparty->code_client)) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 08d57587625..57aec4907a8 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -613,7 +613,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R');
- if ($object->thirdparty->code_client) {
+ if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && $object->thirdparty->code_client) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index e521e01765f..cdc1e660dca 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 && empty($conf->global->MAIN_PDF_NO_CUSTOMER_CODE)) {
+ if (!empty($conf->global->DOC_SHOW_CUSTOMER_CODE) && $object->thirdparty->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 ba027a3696b..ed71e52c146 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1992,7 +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
-MAIN_PDF_NO_CUSTOMER_CODE=Hide customer code
+DOC_SHOW_CUSTOMER_CODE=Show 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