From 2debac1ef36234a041d24024d1b3f349c1095012 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Tue, 7 Oct 2025 11:28:56 +0200 Subject: [PATCH] Reorder PDF pages: journal table on page 1, line details on page 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Moved journal entry table to page 1 after declaration info - Line details (Détail de la ligne A1) now start on page 2 - Removed duplicate AddPage() call from addJournalEntryTable - Added explicit AddPage() call in addDetailPages for page 2 start - Improved PDF structure for better readability --- core/class/declarationtva_pdf.class.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 0566d85..a25643f 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -941,13 +941,13 @@ class DeclarationTVA_PDF return; } + // Start line details on page 2 + $pdf->AddPage(); + // Add a detail section for each line with data in the correct order foreach ($lines_with_data as $line_code) { $this->addLineDetailPage($pdf, $declaration, $line_code); } - - // Add journal entry table starting on page 2 - $this->addJournalEntryTable($pdf, $declaration, $ca3_data); } /** @@ -1382,8 +1382,10 @@ class DeclarationTVA_PDF $pdf->Cell(0, 8, 'Statut: ' . $this->translateStatus($declaration->status), 0, 1); $pdf->Ln(10); + // Add journal entry table on page 1 + $this->addJournalEntryTable($pdf, $declaration, $ca3_data); - // Add detailed breakdown pages + // Add detailed breakdown pages starting on page 2 $this->addDetailPages($pdf, $declaration, $ca3_data); // Output PDF @@ -1767,8 +1769,8 @@ class DeclarationTVA_PDF */ private function addJournalEntryTable($pdf, $declaration, $ca3_data) { - // Start a new page for the journal table - $pdf->AddPage(); + // Add some space before the journal table + $pdf->Ln(10); // Title $pdf->SetFont('helvetica', 'B', 16);