diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php
index cee63fd91fd..4a68fe12e6b 100644
--- a/htdocs/admin/pdf.php
+++ b/htdocs/admin/pdf.php
@@ -65,6 +65,8 @@ 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_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);
if (GETPOSTISSET('MAIN_TVAINTRA_NOT_IN_ADDRESS')) dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", GETPOST("MAIN_TVAINTRA_NOT_IN_ADDRESS"), 'chaine', 0, '', $conf->entity);
@@ -253,6 +255,15 @@ for ($i = 1; $i <= 6; $i++) {
}
}
+// Show sender name
+
+print '
| '.$langs->trans("MAIN_PDF_HIDE_SENDER_NAME").' | ';
+if ($conf->use_javascript_ajax) {
+ print ajax_constantonoff('MAIN_PDF_HIDE_SENDER_NAME');
+} else {
+ print $form->selectyesno('MAIN_PDF_HIDE_SENDER_NAME', (!empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) ? $conf->global->MAIN_PDF_HIDE_SENDER_NAME : 0, 1);
+}
+print ' |
';
print '';
print '';
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index bd6caafd15a..315c7d1d32e 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -1418,10 +1418,12 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
index 7fd70459e7a..0378905167f 100644
--- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php
@@ -1604,10 +1604,12 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index c440cbf1cba..fe634ecd50e 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -693,11 +693,13 @@ class pdf_strato extends ModelePDFContract
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetFont('', '', $default_font_size - 1);
diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
index 0f8c78a81d2..69399d79ec4 100644
--- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php
@@ -1097,10 +1097,12 @@ class pdf_espadon extends ModelePdfExpedition
$pdf->SetFillColor(255, 255, 255);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index 2fef145800f..6665dc5954e 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -1047,10 +1047,12 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetFillColor(255, 255, 255);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index a01fab1dacf..f5500aa35cd 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1860,10 +1860,12 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
index 10113962dff..cca8ecddaec 100644
--- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php
@@ -2098,10 +2098,12 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 08d57587625..b54f0f8a7f1 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -649,11 +649,13 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetTextColor(0, 0, 60);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetTextColor(0, 0, 60);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetFont('', '', $default_font_size - 1);
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index b56fbc758db..340d799f6a7 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -1585,10 +1585,12 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
index 8cba1a0b91b..ffa1857b05a 100644
--- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php
@@ -1699,10 +1699,12 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetTextColor(0, 0, 60);
// Show sender name
- $pdf->SetXY($posx + 2, $posy + 3);
- $pdf->SetFont('', 'B', $default_font_size);
- $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
- $posy = $pdf->getY();
+ if (empty($conf->global->MAIN_PDF_HIDE_SENDER_NAME)) {
+ $pdf->SetXY($posx + 2, $posy + 3);
+ $pdf->SetFont('', 'B', $default_font_size);
+ $pdf->MultiCell($widthrecbox - 2, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, $ltrdirection);
+ $posy = $pdf->getY();
+ }
// Show sender information
$pdf->SetXY($posx + 2, $posy);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 14475095dab..c43b7832d49 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1995,6 +1995,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_HIDE_SENDER_NAME=Hide sender/company name in address block
PROPOSAL_PDF_HIDE_PAYMENTTERM=Hide payments conditions
PROPOSAL_PDF_HIDE_PAYMENTMODE=Hide payment mode
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF