diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index a5cde85a74a..3f58353320e 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -65,6 +65,9 @@ if ($action == 'update') { if (GETPOSTISSET('MAIN_PROFID5_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID5_IN_ADDRESS", GETPOST("MAIN_PROFID5_IN_ADDRESS"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET('MAIN_PROFID6_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_PROFID6_IN_ADDRESS", GETPOST("MAIN_PROFID6_IN_ADDRESS"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_PDF_NO_SENDER_FRAME')) dolibarr_set_const($db, "MAIN_PDF_NO_SENDER_FRAME", GETPOST("MAIN_PDF_NO_SENDER_FRAME"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_PDF_NO_RECIPENT_FRAME')) dolibarr_set_const($db, "MAIN_PDF_NO_RECIPENT_FRAME", GETPOST("MAIN_PDF_NO_RECIPENT_FRAME"), 'chaine', 0, '', $conf->entity); + if (GETPOSTISSET('MAIN_PDF_HIDE_SENDER_NAME')) dolibarr_set_const($db, "MAIN_PDF_HIDE_SENDER_NAME", GETPOST("MAIN_PDF_HIDE_SENDER_NAME"), 'chaine', 0, '', $conf->entity); if (GETPOSTISSET('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", GETPOST("MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"), 'chaine', 0, '', $conf->entity); @@ -257,6 +260,25 @@ for ($i = 1; $i <= 6; $i++) { } } +// Borders on address frame + +print ''.$langs->trans("MAIN_PDF_NO_SENDER_FRAME").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_NO_SENDER_FRAME'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_NO_SENDER_FRAME", $arrval, $conf->global->MAIN_PDF_NO_SENDER_FRAME); +} +print ''; + +print ''.$langs->trans("MAIN_PDF_NO_RECIPENT_FRAME").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('MAIN_PDF_NO_RECIPENT_FRAME'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("MAIN_PDF_NO_RECIPENT_FRAME", $arrval, $conf->global->MAIN_PDF_NO_RECIPENT_FRAME); +} + // Show sender name print ''.$langs->trans("MAIN_PDF_HIDE_SENDER_NAME").''; @@ -370,13 +392,11 @@ print $formadmin->select_language($selected, 'PDF_USE_ALSO_LANGUAGE_CODE', 0, nu print ''; // Height of logo - print ''.$langs->trans("MAIN_DOCUMENTS_LOGO_HEIGHT").''; print ''; print ''; // Show project - if (!empty($conf->projet->enabled)) { print ''.$langs->trans("PDF_SHOW_PROJECT").''; $tmparray = array('no' => 'No', 'showprojectref' => 'RefProject', 'showprojectlabel' => 'ShowProjectLabel'); diff --git a/htdocs/admin/pdf_other.php b/htdocs/admin/pdf_other.php index d50476528cb..7dec909ecb6 100644 --- a/htdocs/admin/pdf_other.php +++ b/htdocs/admin/pdf_other.php @@ -113,26 +113,6 @@ if ($conf->use_javascript_ajax) { } print ''; -print ''.$langs->trans("PROPOSAL_PDF_HIDE_PAYMENTTERM"); -print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('PROPOSAL_PDF_HIDE_PAYMENTTERM'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("PROPOSAL_PDF_HIDE_PAYMENTTERM", $arrval, $conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM); -} -print ''; - -print ''.$langs->trans("PROPOSAL_PDF_HIDE_PAYMENTMODE"); -print ''; -if ($conf->use_javascript_ajax) { - print ajax_constantonoff('PROPOSAL_PDF_HIDE_PAYMENTMODE'); -} else { - $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); - print $form->selectarray("PROPOSAL_PDF_HIDE_PAYMENTMODE", $arrval, $conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE); -} -print ''; - /* print ''.$langs->trans("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING").''; if ($conf->use_javascript_ajax) { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 08dfe6c06dd..be0b9f3c6fe 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1408,14 +1408,16 @@ class pdf_einstein extends ModelePDFCommandes $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->MAIN_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 if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1464,11 +1466,13 @@ class pdf_einstein extends ModelePDFCommandes } // 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->MAIN_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/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 7ede5e56f6f..7e04445ea15 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1594,14 +1594,16 @@ class pdf_eratosthene extends ModelePDFCommandes // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1649,11 +1651,13 @@ class pdf_eratosthene extends ModelePDFCommandes } // 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->MAIN_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/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 6014590f0e1..638c22221bd 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -685,12 +685,14 @@ class pdf_strato extends ModelePDFContract $hautcadre = 40; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -740,11 +742,13 @@ class pdf_strato extends ModelePDFContract } // Show recipient frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx + 2, $posy - 5); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); - $pdf->SetTextColor(0, 0, 0); + if (empty($conf->global->MAIN_PDF_NO_RECIPENT_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + $pdf->SetTextColor(0, 0, 0); + } // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 0b0a5a6bf6d..28d797acffc 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1086,15 +1086,17 @@ class pdf_espadon extends ModelePdfExpedition $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L'); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); - $pdf->SetFillColor(255, 255, 255); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L'); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + $pdf->SetFillColor(255, 255, 255); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1141,11 +1143,13 @@ class pdf_espadon extends ModelePdfExpedition } // 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("Recipient"), 0, 'L'); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + if (empty($conf->global->MAIN_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("Recipient"), 0, 'L'); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + } // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 334bde4887c..aa6603fa35a 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -1036,15 +1036,17 @@ class pdf_rouget extends ModelePdfExpedition $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L'); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); - $pdf->SetFillColor(255, 255, 255); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("Sender"), 0, 'L'); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + $pdf->SetFillColor(255, 255, 255); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1091,11 +1093,13 @@ class pdf_rouget extends ModelePdfExpedition } // 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("Recipient"), 0, 'L'); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + if (empty($conf->global->MAIN_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("Recipient"), 0, 'L'); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + } // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 3ca34611f8d..44b658cc42e 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1850,14 +1850,16 @@ class pdf_crabe extends ModelePDFFactures // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1906,11 +1908,13 @@ class pdf_crabe extends ModelePDFFactures } // Show recipient frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx + 2, $posy - 5); - $pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + if (empty($conf->global->MAIN_PDF_NO_RECIPENT_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->MultiCell($widthrecbox - 2, 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/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index d64ff2a4d4a..d6b4516695a 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2088,14 +2088,16 @@ class pdf_sponge extends ModelePDFFactures // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -2143,11 +2145,13 @@ class pdf_sponge extends ModelePDFFactures } // Show recipient frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx + 2, $posy - 5); - $pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + if (empty($conf->global->MAIN_PDF_NO_RECIPENT_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->MultiCell($widthrecbox - 2, 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/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index b5fd6372e6b..37d64c43e17 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -641,12 +641,14 @@ class pdf_soleil extends ModelePDFFicheinter $hautcadre = 40; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -694,11 +696,13 @@ class pdf_soleil extends ModelePDFFicheinter } // Show recipient frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx + 2, $posy - 5); - $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); - $pdf->SetTextColor(0, 0, 0); + if (empty($conf->global->MAIN_PDF_NO_RECIPENT_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx + 2, $posy - 5); + $pdf->Rect($posx, $posy, $widthrecbox, $hautcadre); + $pdf->SetTextColor(0, 0, 0); + } // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index f9665df97ef..2045683661b 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->MAIN_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 if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1630,11 +1632,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->MAIN_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/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 01eaababc9f..7d8ada03ad5 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -1689,14 +1689,16 @@ class pdf_cyan extends ModelePDFPropales $widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 82; // Show sender frame - $pdf->SetTextColor(0, 0, 0); - $pdf->SetFont('', '', $default_font_size - 2); - $pdf->SetXY($posx, $posy - 5); - $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); - $pdf->SetXY($posx, $posy); - $pdf->SetFillColor(230, 230, 230); - $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); - $pdf->SetTextColor(0, 0, 60); + if (empty($conf->global->MAIN_PDF_NO_SENDER_FRAME)) { + $pdf->SetTextColor(0, 0, 0); + $pdf->SetFont('', '', $default_font_size - 2); + $pdf->SetXY($posx, $posy - 5); + $pdf->MultiCell($widthrecbox, 5, $outputlangs->transnoentities("BillFrom"), 0, $ltrdirection); + $pdf->SetXY($posx, $posy); + $pdf->SetFillColor(230, 230, 230); + $pdf->MultiCell($widthrecbox, $hautcadre, "", 0, 'R', 1); + $pdf->SetTextColor(0, 0, 60); + } // Show sender name if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) { @@ -1745,11 +1747,13 @@ class pdf_cyan 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->MAIN_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 95070d5e2ad..134cbdf8d9a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1995,6 +1995,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 +MAIN_PDF_NO_SENDER_FRAME=Hide borders on sender address frame +MAIN_PDF_NO_RECIPENT_FRAME=Hide borders on recipent address frame MAIN_PDF_HIDE_CUSTOMER_CODE=Hide customer code MAIN_PDF_HIDE_SENDER_NAME=Hide sender/company name in address block PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions