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