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] 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');