diff --git a/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php b/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php index 60162fc..7e208a7 100644 --- a/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php +++ b/gestion/lib/Service/InvoiceGroupPdfHandler/InvoiceGroupPdfHandler.php @@ -84,7 +84,7 @@ class InvoiceGroupPdfHandler extends FPDF { $height = $originalHeight * $scale; // Calculer la position pour centrer l'image $x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm - $y = ((297 - $height) / 2 ) + 19; // 297 mm est la hauteur d'une page A4 + $y = ((297 - $height) / 2 ) + 21; // 297 mm est la hauteur d'une page A4 // Ajouter l'image en filigrane $this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur @@ -265,14 +265,15 @@ class InvoiceGroupPdfHandler extends FPDF { $this->SetLineWidth(0.2); $gapBetweenStartingOfArticlesTableAndColumnName = 7; - $tableHeight = $this->thereIsOrderOrCaseNumber ? 137 : 137 + 7; + $additionnalheight = 0.75; + $tableHeight = $this->thereIsOrderOrCaseNumber ? (137 + $additionnalheight) : ( 137 + 6 + $additionnalheight); $this->Rect(3, $this->startingYOfArticlesTable, 204, $tableHeight, "D"); // $this->RoundedRect(3, $this->startingYOfArticlesTable, 204, $tableHeight,5 ,'1234',"D"); // cadre titre des colonnes $this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207,$this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName); // les traits verticaux colonnes $additionalMargRight = 1; - $endingLine = 234; + $endingLine = 233 + $additionnalheight; $this->Line(27 + $additionalMargRight, $this->startingYOfArticlesTable, 27+ $additionalMargRight , $endingLine); $this->Line(142 + $additionalMargRight, $this->startingYOfArticlesTable, 142+ $additionalMargRight , $endingLine); $this->Line(164 + $additionalMargRight, $this->startingYOfArticlesTable, 164+ $additionalMargRight , $endingLine); diff --git a/gestion/lib/Service/InvoicePdfHandler.php b/gestion/lib/Service/InvoicePdfHandler.php index 3be4f30..f7e7615 100644 --- a/gestion/lib/Service/InvoicePdfHandler.php +++ b/gestion/lib/Service/InvoicePdfHandler.php @@ -77,7 +77,7 @@ class InvoicePdfHandler extends FPDF $height = $originalHeight * $scale; // Calculer la position pour centrer l'image $x = (210 - $width) / 2 + 15; // Décalage à droite de 15 mm - $y = ((297 - $height) / 2 ) + 19; // 297 mm est la hauteur d'une page A4 + $y = ((297 - $height) / 2 ) + 21; // 297 mm est la hauteur d'une page A4 // Ajouter l'image en filigrane $this->Image($imagePath, $x, $y, $width, $height); // Chemin, position x, position y, largeur, hauteur @@ -246,10 +246,11 @@ class InvoicePdfHandler extends FPDF private function DrawArticlesTable() { + $this->startingYOfArticlesTable = $this->startingYOfArticlesTable - 2; $this->SetLineWidth(0.2); $gapBetweenStartingOfArticlesTableAndColumnName = 8; - $tableHeight = $this->thereIsOrderOrCaseNumber ? $this->articleTablesHeight : $this->articleTablesHeight + 7; - $this->Rect(3, $this->startingYOfArticlesTable, 204, $tableHeight, "D"); + $tableHeight = $this->thereIsOrderOrCaseNumber ? $this->articleTablesHeight : $this->articleTablesHeight + 9; + $this->Rect(3, $this->startingYOfArticlesTable , 204, $tableHeight, "D"); // cadre titre des colonnes $this->Line(3, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName, 207, $this->startingYOfArticlesTable + $gapBetweenStartingOfArticlesTableAndColumnName); // les traits verticaux colonnes @@ -268,7 +269,7 @@ class InvoicePdfHandler extends FPDF $columnNameY = $this->startingYOfArticlesTable - 1; $this->SetFont('ComicSans', '', 10); $this->SetXY(12 + $additionalMargRight, $columnNameY); - $this->Cell(7, 10, "Date", 0, 0, 'C'); + $this->Cell(7, 10, "Datess", 0, 0, 'C'); $this->SetXY(30 + $additionalMargRight, $columnNameY); $this->Cell(100, 10, "Description", 0, 0, 'C');