From 41457d2adb9e0ad79493adf7f317cfc6494db9b2 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Mon, 9 Aug 2021 17:16:48 +0200 Subject: [PATCH] ok --- htdocs/admin/pdf_other.php | 19 ++++++++++++ .../modules/propale/doc/pdf_azur.modules.php | 30 +++++++++++-------- htdocs/langs/en_US/admin.lang | 2 ++ 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index ed14f2ac119..3d9304ae6ed 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -103,6 +103,25 @@ if ($conf->use_javascript_ajax) { } print ''; +print ''.$langs->trans("PDF_NO_SENDER_FRAME"); +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_NO_SENDER_FRAME'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("PDF_NO_SENDER_FRAME", $arrval, $conf->global->PDF_NO_SENDER_FRAME); +} +print ''; + +print ''.$langs->trans("PDF_NO_RECIPENT_FRAME"); +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PDF_NO_RECIPENT_FRAME'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("PDF_NO_RECIPENT_FRAME", $arrval, $conf->global->PDF_NO_RECIPENT_FRAME); +} +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..06d02d18fb0 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1575,14 +1575,16 @@ class pdf_azur extends ModelePDFPropales $hautcadre = 40; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); + if (empty($conf->global->PDF_NO_SENDER_FRAME)){ + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + } // Show sender name $pdf->SetXY($posx + 2, $posy + 3); @@ -1628,11 +1630,13 @@ class pdf_azur extends ModelePDFPropales } // Show recipient frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx + 2, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + if (empty($conf->global->PDF_NO_RECIPENT_FRAME)){ + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + } // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 98c9e954ac2..2957b94c671 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1992,6 +1992,8 @@ 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_SENDER_FRAME=No sender frame +PDF_NO_RECIPENT_FRAME=No recipent frame 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