From 1aa6cbc70551fc60a5aacf61fe0c3069e5f81aa9 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Mon, 6 Oct 2025 18:25:14 +0200 Subject: [PATCH] Bump version to 2.2.0 - Updated module version from 2.1.0 to 2.2.0 - Added comprehensive changelog for version 2.2.0 - Documents all new features: validation workflow, PDF management, secure downloads - Documents technical improvements: database migration, error handling, UI cleanup - Documents bug fixes: token validation, PDF detection, path resolution, debug cleanup - Ready for production deployment --- ChangeLog.md | 45 ++++++++++++++++++++++++ core/modules/modDeclarationTVA.class.php | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 7a7370c..853012c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,50 @@ # CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) +## 2.2.0 + +### New Features +- **Declaration Validation**: Complete validation workflow with confirmation dialogs +- **PDF Document Management**: Automatic PDF generation and storage for validated declarations +- **Document Download**: Secure PDF download system with proper authentication +- **Status Management**: Visual status indicators and proper workflow separation +- **Clean UI**: Streamlined interface with working actions only + +### Technical Improvements +- **Database Migration**: Added validation tracking with proper database schema +- **Secure Downloads**: Token-based authentication for PDF downloads +- **Error Handling**: Comprehensive error handling without debug clutter +- **File Management**: Proper document storage in structured directories +- **UI Cleanup**: Removed non-working actions and streamlined interface + +### Bug Fixes +- **Fixed Token Validation**: Resolved download handler authentication issues +- **Fixed PDF Detection**: Improved file pattern matching for document detection +- **Fixed Path Resolution**: Corrected file paths for document storage and access +- **Removed Debug Code**: Cleaned up production code from debugging statements +- **Fixed Button Actions**: Removed non-working buttons from declaration list + +## 2.1.0 + +### New Features +- **Enhanced PDF Export**: CA-3 form now includes detailed breakdown pages in a single comprehensive PDF +- **Detailed Breakdown Pages**: Account-level details for each CA-3 line showing exactly where amounts come from +- **Improved PDF Merging**: Uses pdftk for reliable PDF merging that preserves form fields +- **Conditional Page Breaks**: Optimized page usage to reduce paper consumption +- **Enhanced Line Calculations**: Added support for lines 25, 26, 27, TD, 28, 32 with proper conditional visibility +- **Status Translation**: Proper French translation of declaration status in detailed PDFs + +### Technical Improvements +- **Better Error Handling**: Comprehensive logging and debugging for PDF generation +- **Form Field Preservation**: pdftk-based merging maintains all form data integrity +- **Modular PDF Generation**: Separate detailed PDF generation with fallback options +- **Enhanced Debugging**: Detailed logging for troubleshooting PDF generation issues + +### Bug Fixes +- **Fixed Multi-Select Saving**: Configuration fields now properly save when all selections are removed +- **Fixed PDF Merge Issues**: Resolved pdftk filename conflicts that prevented detailed pages from being added +- **Fixed Status Translation**: Eliminated "Call to a member function trans() on null" errors +- **Fixed Form Corruption**: Prevented FPDI merge from corrupting filled form data + ## 1.1 ### New Features diff --git a/core/modules/modDeclarationTVA.class.php b/core/modules/modDeclarationTVA.class.php index 5e1d83c..dacf46d 100644 --- a/core/modules/modDeclarationTVA.class.php +++ b/core/modules/modDeclarationTVA.class.php @@ -76,7 +76,7 @@ class modDeclarationTVA extends DolibarrModules $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@declarationtva' // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' - $this->version = '2.1.0'; + $this->version = '2.2.0'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt';