From 342d3150662b108b54cc70455153fe93483f804c Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Mon, 6 Oct 2025 18:12:31 +0200 Subject: [PATCH] Hide PDF export button for validated declarations - PDF export button now only shows for draft declarations - Validated declarations should use the PDF download link from the list - Prevents confusion between export and download functionality - Maintains clear separation between draft (export) and validated (download) workflows --- declarationtva_view.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/declarationtva_view.php b/declarationtva_view.php index 4dd9c13..7aeb923 100644 --- a/declarationtva_view.php +++ b/declarationtva_view.php @@ -448,8 +448,10 @@ if ($declarationtva->status == 'draft') { print '' . $langs->trans("Recalculate") . ' '; } -// PDF Export button (always available) -print '' . $langs->trans("ExportPDF") . ' '; +// PDF Export button (only for draft status) +if ($declarationtva->status == 'draft') { + print '' . $langs->trans("ExportPDF") . ' '; +} if ($declarationtva->status == 'draft') { // Validation button with confirmation dialog