';
if ($d['status'] == 'draft') {
diff --git a/langs/en_US/declarationtva.lang b/langs/en_US/declarationtva.lang
index 76b23cb..d3a1df6 100644
--- a/langs/en_US/declarationtva.lang
+++ b/langs/en_US/declarationtva.lang
@@ -492,3 +492,19 @@ TemplateResetFailed = Error resetting to official template
ErrorGeneratingPDF = Error generating PDF
TemplateUpdated = Template updated successfully
TemplateUpdateFailed = Error updating template
+
+# Validation
+Validate = Validate
+ConfirmValidation = Confirm Validation
+ValidationConfirmationMessage = Are you sure you want to validate this declaration? This action is irreversible and will automatically generate the detailed PDF.
+YesValidate = Yes, validate
+Cancel = Cancel
+DeclarationValidated = Declaration validated successfully
+ErrorValidatingDeclaration = Error validating declaration
+
+# Document and status icons
+Document = Document
+ValidatedDeclaration = Validated Declaration
+DraftDeclaration = Draft Declaration
+ValidatedPDFAvailable = Validated PDF Available
+NoDocument = No Document
diff --git a/langs/fr_FR/declarationtva.lang b/langs/fr_FR/declarationtva.lang
index bddf4c6..f1c519b 100644
--- a/langs/fr_FR/declarationtva.lang
+++ b/langs/fr_FR/declarationtva.lang
@@ -464,3 +464,19 @@ TemplateResetFailed = Erreur lors du retour au modèle officiel
ErrorGeneratingPDF = Erreur lors de la génération du PDF
TemplateUpdated = Modèle mis à jour avec succès
TemplateUpdateFailed = Erreur lors de la mise à jour du modèle
+
+# Validation
+Validate = Valider
+ConfirmValidation = Confirmer la validation
+ValidationConfirmationMessage = Êtes-vous sûr de vouloir valider cette déclaration ? Cette action est irréversible et générera automatiquement le PDF détaillé.
+YesValidate = Oui, valider
+Cancel = Annuler
+DeclarationValidated = Déclaration validée avec succès
+ErrorValidatingDeclaration = Erreur lors de la validation de la déclaration
+
+# Document and status icons
+Document = Document
+ValidatedDeclaration = Déclaration validée
+DraftDeclaration = Déclaration brouillon
+ValidatedPDFAvailable = PDF validé disponible
+NoDocument = Aucun document
diff --git a/sql/migration_add_documents_table.sql b/sql/migration_add_documents_table.sql
new file mode 100644
index 0000000..504ecb1
--- /dev/null
+++ b/sql/migration_add_documents_table.sql
@@ -0,0 +1,26 @@
+-- Migration: Add documents table for linking validated PDFs to declarations
+-- Version: 2.1.0
+-- Date: 2025-01-06
+
+-- Create table for linking documents to declarations
+CREATE TABLE IF NOT EXISTS `llx_declarationtva_documents` (
+ `rowid` int(11) NOT NULL AUTO_INCREMENT,
+ `declaration_id` int(11) NOT NULL,
+ `document_id` int(11) NOT NULL,
+ `created_date` datetime NOT NULL,
+ `entity` int(11) NOT NULL DEFAULT 1,
+ PRIMARY KEY (`rowid`),
+ KEY `idx_declaration_id` (`declaration_id`),
+ KEY `idx_document_id` (`document_id`),
+ KEY `idx_entity` (`entity`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+-- Add validated_date and validated_by columns to declarations table if they don't exist
+ALTER TABLE `llx_declarationtva_declarations`
+ADD COLUMN IF NOT EXISTS `validated_date` datetime DEFAULT NULL,
+ADD COLUMN IF NOT EXISTS `validated_by` int(11) DEFAULT NULL;
+
+-- Add indexes for performance
+ALTER TABLE `llx_declarationtva_declarations`
+ADD INDEX IF NOT EXISTS `idx_validated_date` (`validated_date`),
+ADD INDEX IF NOT EXISTS `idx_validated_by` (`validated_by`);