NEW FEATURES: ✅ Gitea API Integration for Template Management ✅ Automatic Template Update Checking ✅ Version Control and Manifest System ✅ One-Click Template Updates in Configuration ✅ Professional Template Management Workflow TECHNICAL IMPLEMENTATION: - Enhanced DeclarationTVA_PDF class with auto-update methods - Template manifest system (templates/manifest.json) - Gitea API integration for template downloads - Update status display in configuration page - Version comparison and automatic updates TEMPLATE MANAGEMENT: - Current version: 30 (10963*30) - Gitea repository: https://git.covago.com/frank/DeclarationTVA - Manifest URL: templates/manifest.json - Auto-update on module activation - Fallback to built-in template MAINTENANCE WORKFLOW: 1. Tax authority updates form → Create fillable version (5 min) 2. Update manifest.json with new version (1 min) 3. Upload template to Gitea (2 min) 4. Users get automatic updates (0 min for maintainer) This creates a professional, self-hosted template management system with minimal maintenance overhead!
2.9 KiB
2.9 KiB
CA-3 Template Management System
This directory contains the template management system for the DeclarationTVA module.
📁 Directory Structure
templates/
├── manifest.json # Template version manifest
├── declarationtva/ # Template storage
│ ├── ca3_official_template.pdf # Official template (current)
│ ├── ca3_custom_template.pdf # Custom template (if uploaded)
│ └── README.md # Template directory info
└── README.md # This file
🔄 Template Update Workflow
For Maintainers (You)
- Tax authority updates CA-3 form → You receive new PDF
- Create fillable version (5 minutes with Adobe Acrobat)
- Update manifest.json:
{ "templates": { "ca3": { "current_version": "31", "document_number": "10963*31", "releases": { "31": { "download_url": "https://git.covago.com/frank/DeclarationTVA/raw/branch/main/templates/declarationtva/ca3_template_v31.pdf", "checksum": "sha256:actual_checksum_here", "release_date": "2025-03-15" } } } } } - Upload new template to
templates/declarationtva/ - Commit and push to Gitea
- Users get automatic updates (0 minutes for you)
For Users
- Automatic checking on module activation
- Update notifications in configuration page
- One-click updates via "Mettre à jour" button
- Fallback to built-in if update fails
🎯 Benefits
- ✅ Minimal maintenance (5-10 minutes per update)
- ✅ Automatic user updates (no manual downloads)
- ✅ Version control (track all template versions)
- ✅ Professional system (enterprise-grade template management)
- ✅ Self-hosted (your Gitea, your control)
📋 Template Requirements
- Format: PDF with fillable form fields
- Naming:
ca3_template_v{version}.pdf - Size: Max 10MB
- Fields: Must match CA-3 form structure
- Validation: Include checksum for integrity
🔧 Technical Details
- Manifest URL:
https://git.covago.com/frank/DeclarationTVA/raw/branch/main/templates/manifest.json - Template URL:
https://git.covago.com/frank/DeclarationTVA/raw/branch/main/templates/declarationtva/ - Auto-update: Checks on module activation and configuration access
- Fallback: Uses built-in template if download fails
🚀 Getting Started
- Make repository public (required for template downloads)
- Upload your fillable CA-3 template to
templates/declarationtva/ - Update manifest.json with correct version and URLs
- Test auto-update in module configuration
- Users will see update notifications automatically
This system provides professional template management with minimal maintenance overhead!