From 77eb60036181ee5dcc8216dec75a58b0e958fc75 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Fri, 3 Jan 2025 17:05:56 +0300 Subject: [PATCH] fix adresse trim --- gestion/lib/Controller/PageController.php | 8 ++++---- gestion/lib/Service/InvoicePdfHandler.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index 5a24c35..bf66d67 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -827,9 +827,9 @@ class PageController extends Controller { $pdf->SetFont('Arial','B',size: 11); $pdf->SetY(40); $pdf->Cell( 0, 8, utf8_decode($current_client), 0, 1, 'R'); - $pdf->Cell( 0, 8, utf8_decode(html_entity_decode($clientAddress)), 0,1,'R'); + $pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientAddress))), 0,1,'R'); if($clientCity != ''){ - $pdf->Cell( 0, 8, utf8_decode(html_entity_decode($clientCity)), 0, 1, 'R'); + $pdf->Cell( 0, 8, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R'); } // date facture $pdf->SetFont('Arial','',11); @@ -906,9 +906,9 @@ class PageController extends Controller { $pdf->SetFont('Arial','B',11); $pdf->SetY(y: 32); $pdf->Cell( 0, 6, utf8_decode($current_client), 0, 1, 'R'); - $pdf->Cell( 0, 6, utf8_decode(html_entity_decode($clientAddress)), 0, 1, 'R'); + $pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientAddress))), 0, 1, 'R'); if($clientCity != ''){ - $pdf->Cell( 0, 6, utf8_decode(html_entity_decode($clientCity)), 0, 1, 'R'); + $pdf->Cell( 0, 6, trim(utf8_decode(html_entity_decode($clientCity))), 0, 1, 'R'); } $pdf->Cell( 0, 6, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . FileExportHelpers::FormatTextForExport($tvaIntraCommuValue), 0, 1, 'R'); $pdf->Cell( 0, 6, 'Email: ' . utf8_decode(html_entity_decode($facture['mail_client'])), 0, 1, 'R'); diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 47731b9..2d777cb 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -77,9 +77,9 @@ class InvoicePdfHandler extends FPDF { $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration']->entreprise), 0, 0); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['client_nom'] . ' ' . $this->factureData['client_entreprise']), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse']), 0, 0); - $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['client_real_adress']), 0, 1,'R'); + $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_real_adress'])), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['configuration_adresse_city']), 0, 0);border: - $this->Cell(0, 7, FileExportHelpers::FormatTextForExport($this->factureData['client_adress_city']), 0, 1,'R'); + $this->Cell(0, 7, trim(FileExportHelpers::FormatTextForExport($this->factureData['client_adress_city'])), 0, 1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Tél : ') . FileExportHelpers::FormatTextForExport($this->factureData['configuration']->telephone),0,1,'R'); $this->Cell(0, 7, FileExportHelpers::FormatTextForExport('Numéro') . ' Siret: ' . $this->factureData['siret'], 0, 1,'R'); $this->Cell(0, 7, 'Mail : ' . $this->factureData['configuration']->mail, 0, 1);