From 6b3b6fd50843703e2820906b874e78b655351a7e Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Mon, 9 Aug 2021 18:01:43 +0200 Subject: [PATCH 01/12] ok --- htdocs/admin/pdf_other.php | 10 ++++++++++ .../core/modules/propale/doc/pdf_azur.modules.php | 13 +++++++++---- htdocs/langs/en_US/admin.lang | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index ed14f2ac119..c30765f6162 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -103,6 +103,16 @@ if ($conf->use_javascript_ajax) { } print ''; +print ''.$langs->trans("PDF_REF_IN_TITLE"); +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_REF_IN_TITLE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("PDF_REF_IN_TITLE", $arrval, $conf->global->PDF_REF_IN_TITLE); +} +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..49f72381357 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1473,16 +1473,21 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); + if(!empty($conf->global->PDF_REF_IN_TITLE)){ + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell(100, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + if(empty($conf->global->PDF_REF_IN_TITLE)){ + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - $posy += 1; + $posy += 1; + } $pdf->SetFont('', '', $default_font_size - 2); if ($object->ref_client) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 98c9e954ac2..135c4d54040 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_REF_IN_TITLE=Document ref in title 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 From adc6f883e2e704beed1fe1bf64b6131bc0cc1eed Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 9 Aug 2021 16:03:13 +0000 Subject: [PATCH 02/12] Fixing style errors. --- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 49f72381357..a3883cea5d5 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1473,7 +1473,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); - if(!empty($conf->global->PDF_REF_IN_TITLE)){ + if (!empty($conf->global->PDF_REF_IN_TITLE)) { $title .= " " . $outputlangs->convToOutputCharset($object->ref); } $pdf->MultiCell(100, 4, $title, '', 'R'); @@ -1481,7 +1481,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', 'B', $default_font_size); $posy += 5; - if(empty($conf->global->PDF_REF_IN_TITLE)){ + if (empty($conf->global->PDF_REF_IN_TITLE)) { $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); From 366625f300fc161ac234950928a2fe6940261025 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Tue, 10 Aug 2021 09:50:14 +0200 Subject: [PATCH 03/12] const --- htdocs/admin/pdf.php | 12 ++++++++++++ htdocs/admin/pdf_other.php | 10 ---------- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 4 ++-- htdocs/langs/en_US/admin.lang | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index cee63fd91fd..d966f9546e1 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -349,6 +349,18 @@ if ($conf->use_javascript_ajax) { } print ''; +// Document ref in title + +print ''.$langs->trans("MAIN_PDF_REF_IN_TITLE"); +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_REF_IN_TITLE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_REF_IN_TITLE", $arrval, $conf->global->MAIN_PDF_REF_IN_TITLE); +} +print ''; + // Place customer adress to the ISO location print ''.$langs->trans("PlaceCustomerAddressToIsoLocation").''; diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index c30765f6162..ed14f2ac119 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -103,16 +103,6 @@ if ($conf->use_javascript_ajax) { } print ''; -print ''.$langs->trans("PDF_REF_IN_TITLE"); -print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('PDF_REF_IN_TITLE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("PDF_REF_IN_TITLE", $arrval, $conf->global->PDF_REF_IN_TITLE); -} -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 a3883cea5d5..a36833a57c6 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1473,7 +1473,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); - if (!empty($conf->global->PDF_REF_IN_TITLE)) { + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { $title .= " " . $outputlangs->convToOutputCharset($object->ref); } $pdf->MultiCell(100, 4, $title, '', 'R'); @@ -1481,7 +1481,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetFont('', 'B', $default_font_size); $posy += 5; - if (empty($conf->global->PDF_REF_IN_TITLE)) { + if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 135c4d54040..9bd9ba05f42 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 -PDF_REF_IN_TITLE=Document ref in title +MAIN_PDF_REF_IN_TITLE=Document ref in title 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 From 133bb0e699893191e07e4b6647b79a35baa04968 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Tue, 10 Aug 2021 13:28:36 +0200 Subject: [PATCH 04/12] yes/no save --- htdocs/admin/pdf.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index d966f9546e1..e6dba5357cd 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -88,6 +88,8 @@ if ($action == 'update') { if (GETPOSTISSET('MAIN_DOCUMENTS_LOGO_HEIGHT')) dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET('MAIN_INVERT_SENDER_RECIPIENT')) dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", GETPOST("MAIN_INVERT_SENDER_RECIPIENT"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_PDF_REF_IN_TITLE')) dolibarr_set_const($db, "MAIN_PDF_REF_IN_TITLE", GETPOST("MAIN_PDF_REF_IN_TITLE"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_PDF_USE_ISO_LOCATION')) dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", GETPOST("MAIN_PDF_USE_ISO_LOCATION"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", GETPOST("MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"), 'chaine', 0, '', $conf->entity); From 40329b9181a53e3eb05027dab70928f06a5b2334 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Wed, 11 Aug 2021 12:59:34 +0200 Subject: [PATCH 05/12] other_doc --- .../modules/commande/doc/pdf_einstein.modules.php | 13 +++++++++---- .../modules/contract/doc/pdf_strato.modules.php | 11 ++++++++--- .../modules/expedition/doc/pdf_rouget.modules.php | 12 ++++++++---- .../core/modules/facture/doc/pdf_crabe.modules.php | 4 +++- .../modules/fichinter/doc/pdf_soleil.modules.php | 11 ++++++++--- 5 files changed, 36 insertions(+), 15 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index bd6caafd15a..17fbe9cc9aa 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1311,16 +1311,21 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities($titlekey); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - $posy += 1; + $posy += 1; + } $pdf->SetFont('', '', $default_font_size - 1); if ($object->ref_client) { diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index c440cbf1cba..818a6aae64a 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -640,14 +640,19 @@ class pdf_strato extends ModelePDFContract $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("ContractCard"); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell(100, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size + 2); $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + } $posy += 1; $pdf->SetFont('', '', $default_font_size); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 79ceb166eed..b38bea345d3 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -953,15 +953,19 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SendingSheet"); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); $posy += 5; - - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); + if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); + } // Date planned delivery if (!empty($object->date_delivery)) { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index a01fab1dacf..0c9abb866a1 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -985,7 +985,9 @@ class pdf_crabe extends ModelePDFFactures if ($object->type == 2) { $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); } - + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); $pdf->MultiCell(60, 3, $title, 0, 'L', 0); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 08d57587625..23afd0e057a 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -596,14 +596,19 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("InterventionCard"); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell(100, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size + 2); $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); + } $posy += 1; $pdf->SetFont('', '', $default_font_size); From 3e2b4b45c153b29a5a90c593230056a78ed46665 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 11 Aug 2021 11:00:11 +0000 Subject: [PATCH 06/12] Fixing style errors. --- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 818a6aae64a..52533faf056 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -652,7 +652,7 @@ class pdf_strato extends ModelePDFContract $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - } + } $posy += 1; $pdf->SetFont('', '', $default_font_size); From fb42e3f47330f8390a0ccc7fdf0b61332ba790ba Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Wed, 11 Aug 2021 18:25:48 +0200 Subject: [PATCH 07/12] add_doc --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 3 +++ htdocs/core/modules/expedition/doc/pdf_espadon.modules.php | 3 +++ htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 3 +++ htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 3 +++ 4 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 83ccd391bd9..344b5842008 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1482,6 +1482,9 @@ class pdf_eratosthene extends ModelePDFCommandes $title .= ' - '; $title .= $outputlangsbis->transnoentities($titlekey); } + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell($w, 3, $title, '', 'R'); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index f6f4b0b1a2a..4b20425254e 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1003,6 +1003,9 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SendingSheet"); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 401309c22e5..069581e496a 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -986,6 +986,9 @@ class pdf_sponge extends ModelePDFFactures if ($object->type == 2) { $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); } + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index f75f5ecab56..d1f86050473 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1574,6 +1574,9 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); + if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + } $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); From 10c445cf6a59bc8b36fe7eb5a7bede1222ddd4f9 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Thu, 19 Aug 2021 16:13:41 +0200 Subject: [PATCH 08/12] default ref in title --- .../commande/doc/pdf_einstein.modules.php | 16 +++------------- .../commande/doc/pdf_eratosthene.modules.php | 5 ++--- .../contract/doc/pdf_strato.modules.php | 18 ++++-------------- .../expedition/doc/pdf_espadon.modules.php | 6 +++--- .../expedition/doc/pdf_rouget.modules.php | 15 ++++----------- .../modules/facture/doc/pdf_crabe.modules.php | 6 +++--- .../modules/facture/doc/pdf_sponge.modules.php | 5 ++--- .../fichinter/doc/pdf_soleil.modules.php | 15 +++------------ .../modules/propale/doc/pdf_azur.modules.php | 6 +++--- .../modules/propale/doc/pdf_cyan.modules.php | 6 ++---- 10 files changed, 29 insertions(+), 69 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index afa31dac57d..22a6955aa48 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1311,21 +1311,11 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities($titlekey); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell($w, 3, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size); - - $posy += 5; - if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - - $posy += 1; - } $pdf->SetFont('', '', $default_font_size - 1); if ($object->ref_client) { diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 8ddc675925c..f689ed95734 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1482,9 +1482,8 @@ class pdf_eratosthene extends ModelePDFCommandes $title .= ' - '; $title .= $outputlangsbis->transnoentities($titlekey); } - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); $pdf->MultiCell($w, 3, $title, '', 'R'); diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index e046f829486..d3d0f1905ff 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -640,24 +640,14 @@ class pdf_strato extends ModelePDFContract $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("ContractCard"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell(100, 4, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size + 2); - - $posy += 5; - if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - } - - $posy += 1; $pdf->SetFont('', '', $default_font_size); - $posy += 4; + $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_contrat, "day", false, $outputlangs, true), '', 'R'); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 4042809a870..3ea72178622 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1003,9 +1003,9 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SendingSheet"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 6024f07f8be..979b34a4b83 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -953,23 +953,16 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SendingSheet"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); - $posy += 5; - if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); - } - // Date planned delivery if (!empty($object->date_delivery)) { - $posy += 4; + $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R'); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 832033cb932..98d62204bd4 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -985,9 +985,9 @@ class pdf_crabe extends ModelePDFFactures if ($object->type == 2) { $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); } - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); $pdf->MultiCell(60, 3, $title, 0, 'L', 0); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index bf81a83d9ad..65d5e57f9e4 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -986,9 +986,8 @@ class pdf_sponge extends ModelePDFFactures if ($object->type == 2) { $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); } - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); $pdf->SetFont('', '', $default_font_size - 3); $pdf->SetXY($tab3_posx, $tab3_top - 4); diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index e89d86cacdd..8710c67dda1 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -596,24 +596,15 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("InterventionCard"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell(100, 4, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size + 2); - $posy += 5; - if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - } - $posy += 1; $pdf->SetFont('', '', $default_font_size); - $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R'); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index bd966458b2a..e86d6208bf1 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1473,9 +1473,9 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + + $title .= " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell(100, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 5fe4685a469..39211dde470 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1573,10 +1573,8 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); - if (!empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $title .= " " . $outputlangs->convToOutputCharset($object->ref); - } + $title = $outputlangs->transnoentities("PdfCommercialProposalTitle") . " " . $outputlangs->convToOutputCharset($object->ref); + $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', 'B', $default_font_size); From 58b50d02c752f76f4d7f6f1281594afdc0af9dcd Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Thu, 19 Aug 2021 16:43:35 +0200 Subject: [PATCH 09/12] default ref in title 2 --- .../commande/doc/pdf_einstein.modules.php | 3 ++- .../commande/doc/pdf_eratosthene.modules.php | 16 ++-------------- .../expedition/doc/pdf_espadon.modules.php | 7 ------- .../expedition/doc/pdf_rouget.modules.php | 3 ++- .../modules/propale/doc/pdf_azur.modules.php | 12 +----------- .../modules/propale/doc/pdf_cyan.modules.php | 19 ++++--------------- 6 files changed, 11 insertions(+), 49 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 22a6955aa48..2a1f283a02c 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1317,9 +1317,10 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($w, 3, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size - 1); + $posy += 2; if ($object->ref_client) { - $posy += 5; + $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index f689ed95734..b8622fe3b26 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1487,23 +1487,11 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->MultiCell($w, 3, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size); - - $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) { - $pdf->SetTextColor(128, 0, 0); - $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); - } - $pdf->MultiCell($w, 4, $textref, '', 'R'); - - $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); + $posy += 2; if ($object->ref_client) { - $posy += 4; + $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 3ea72178622..c20ffec1d72 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1003,19 +1003,12 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SendingSheet"); - $title .= " " . $outputlangs->convToOutputCharset($object->ref); $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); - $posy += 5; - - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("RefSending")." : ".$object->ref, '', 'R'); - // Date planned delivery if (!empty($object->date_delivery)) { $posy += 4; diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 979b34a4b83..1b2b35e8562 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -959,10 +959,11 @@ class pdf_rouget extends ModelePdfExpedition $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); + $posy += 1; // Date planned delivery if (!empty($object->date_delivery)) { - $posy += 5; + $posy += 4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 4, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, "day", false, $outputlangs, true), '', 'R'); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index e86d6208bf1..9ea3e34511c 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1473,22 +1473,12 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); - $title .= " " . $outputlangs->convToOutputCharset($object->ref); $pdf->MultiCell(100, 4, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size); - - $posy += 5; - if (empty($conf->global->MAIN_PDF_REF_IN_TITLE)) { - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R'); - - $posy += 1; - } $pdf->SetFont('', '', $default_font_size - 2); + $posy += 1; if ($object->ref_client) { $posy += 4; diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 39211dde470..66096f4679b 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1573,27 +1573,16 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetFont('', 'B', $default_font_size + 3); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $title = $outputlangs->transnoentities("PdfCommercialProposalTitle") . " " . $outputlangs->convToOutputCharset($object->ref); + $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); + $title .= " " . $outputlangs->convToOutputCharset($object->ref); $pdf->MultiCell($w, 4, $title, '', 'R'); - $pdf->SetFont('', 'B', $default_font_size); - - $posy += 5; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == $object::STATUS_DRAFT) { - $pdf->SetTextColor(128, 0, 0); - $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); - } - $pdf->MultiCell($w, 4, $textref, '', 'R'); - - $posy += 1; $pdf->SetFont('', '', $default_font_size - 2); + $posy += 2; if ($object->ref_client) { - $posy += 4; + $posy += 3; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer")." : ".$outputlangs->convToOutputCharset($object->ref_client), '', 'R'); From c750c5f7cfdf88af490b80255355400ba7b4cb3b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 19 Aug 2021 14:45:55 +0000 Subject: [PATCH 10/12] Fixing style errors. --- htdocs/core/modules/propale/doc/pdf_cyan.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 66096f4679b..703ebaa62f0 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1575,7 +1575,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("PdfCommercialProposalTitle"); $title .= " " . $outputlangs->convToOutputCharset($object->ref); - + $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size - 2); From f50842cdef94a09f358077c2e266f76a05252829 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Thu, 19 Aug 2021 18:16:58 +0200 Subject: [PATCH 11/12] cop --- htdocs/admin/pdf.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 5e05e43ed28..ad58cb54137 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 From bd67b46138b5aea72acf6b4c8521b86ca366372c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Aug 2021 20:18:26 +0200 Subject: [PATCH 12/12] Fix duplicate code --- htdocs/admin/pdf.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index ad58cb54137..ebdb20a29b6 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -419,28 +419,6 @@ if ($conf->use_javascript_ajax) { } print ''; -// Place customer adress to the ISO location - -print ''.$langs->trans("PlaceCustomerAddressToIsoLocation").''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MAIN_PDF_USE_ISO_LOCATION'); -} else { - print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION', (!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION)) ? $conf->global->MAIN_PDF_USE_ISO_LOCATION : 0, 1); -} -print ''; - -// Use 2 languages into PDF - -print ''.$langs->trans("PDF_USE_ALSO_LANGUAGE_CODE").''; -//if (! empty($conf->global->MAIN_MULTILANGS)) -//{ -$selected = GETPOSTISSET('PDF_USE_ALSO_LANGUAGE_CODE') ? GETPOST('PDF_USE_ALSO_LANGUAGE_CODE') : (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) ? $conf->global->PDF_USE_ALSO_LANGUAGE_CODE : 0); -print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, null, 1); -//} else { -// print ''.$langs->trans("MultiLangNotEnabled").''; -//} -print ''; - // Ref print ''.$langs->trans("HideRefOnPDF").'';