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
This commit is contained in:
Frank Cools 2025-10-06 18:12:31 +02:00
parent 6e9f620925
commit 342d315066

View File

@ -448,8 +448,10 @@ if ($declarationtva->status == 'draft') {
print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&action=recalculate&token=' . newToken() . '" class="butAction">' . $langs->trans("Recalculate") . '</a> '; print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&action=recalculate&token=' . newToken() . '" class="butAction">' . $langs->trans("Recalculate") . '</a> ';
} }
// PDF Export button (always available) // PDF Export button (only for draft status)
if ($declarationtva->status == 'draft') {
print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&action=export_pdf" class="butAction">' . $langs->trans("ExportPDF") . '</a> '; print '<a href="' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&action=export_pdf" class="butAction">' . $langs->trans("ExportPDF") . '</a> ';
}
if ($declarationtva->status == 'draft') { if ($declarationtva->status == 'draft') {
// Validation button with confirmation dialog // Validation button with confirmation dialog