From c1881beafc3593ccd166ffae2a4a7fbe4fdf6ed0 Mon Sep 17 00:00:00 2001 From: Narindra ezway Date: Thu, 24 Apr 2025 13:49:50 +0300 Subject: [PATCH] fixe-text-and-table-startY-after-mainTbale --- .../InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php | 6 +++--- gestion/lib/Service/InvoicePdfHandler.php | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php b/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php index af5b85c..845f077 100644 --- a/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php +++ b/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php @@ -378,7 +378,8 @@ class InvoiceGroupPdfHandler extends FPDF { } public function DrawBankAndTotalPriceInfo(){ - $this->SetY(239); + $startOfYAfterMainTable = 239; + $this->SetY( $startOfYAfterMainTable); $this->SetFont('ComicSans', '', 8); $this->MultiCell(0,4,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise))); $this->MultiCell(0,4,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); @@ -389,7 +390,6 @@ class InvoiceGroupPdfHandler extends FPDF { $this->SetX($startOftable); $this->SetFont('ComicSans', '', 8); $ibanWidth = 62; - $ibanCursorY = $this->GetY(); $this->Cell($ibanWidth, 6.5, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); $ibanCursorX = $this->GetX(); $this->SetX($startOftable); @@ -402,7 +402,7 @@ class InvoiceGroupPdfHandler extends FPDF { $pageWidth = 210; // Largeur d'une page A4 en mm (portrait) // Position correcte de la 2e table $startOfArrayX = $pageWidth - $tableWidth - $marginRight ; - $startOfArrayY = $ibanCursorY - 5; + $startOfArrayY = $startOfYAfterMainTable + 0.5; $this->SetFont('ComicSans', '', 10); $totalPriceArray = $this->totalPrices; diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index fe60d4a..7abd166 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -338,7 +338,8 @@ class InvoicePdfHandler extends FPDF private function DrawBankAndTotalPriceInfo($totalPriceArray) { - $this->SetY(239); + $startOfYAfterMainTable = 239; + $this->SetY( $startOfYAfterMainTable); $this->SetFont('ComicSans', '', 8); $this->MultiCell(0,4,utf8_decode(html_entity_decode("Paiement à votre convenance par chèque à l'ordre de ". $this->factureData['configuration']->entreprise))); $this->MultiCell(0,4,utf8_decode(html_entity_decode("en indiquant le numéro de facture, ou par virement :"))); @@ -349,9 +350,7 @@ class InvoicePdfHandler extends FPDF // Table IBAN $this->SetFont('ComicSans', '', 8); $ibanWidth = 62; - $ibanCursorY = $this->GetY(); $this->Cell($ibanWidth, 6.5, 'IBAN : FR76 1360 6000 1436 5418 1800 038', 1, 1, 'C'); - $ibanCursorX = $this->GetX(); $this->SetX($startOftable); $this->Cell($ibanWidth, 6.5, 'Code SWIFT : AGRI FR PP 836', 1, 1, 'C'); @@ -362,7 +361,7 @@ class InvoicePdfHandler extends FPDF // Position correcte de la 2e table $startOfArrayX = $pageWidth - $tableWidth - $marginRight; - $startOfArrayY = $ibanCursorY - 5; + $startOfArrayY = $startOfYAfterMainTable + 0.5; $this->SetFont('ComicSans', '', 10);