From 14427dec13badcad6e1a0e2e39d6128972337df3 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Wed, 8 Oct 2025 12:47:50 +0200 Subject: [PATCH] v2.5.12: Fixed TCPDF path error by removing duplicate include - Removed incorrect TCPDF include since it's already loaded by Dolibarr - Fixed 'Failed opening required' error for TCPDF file - TCPDF is already available through Dolibarr's standard loading at line 69 - Custom PDF class now works without duplicate includes - Updated module version to 2.5.12 --- ChangeLog.md | 8 ++++++++ core/class/declarationtva_pdf.class.php | 4 ---- core/modules/modDeclarationTVA.class.php | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index eb5358e..1dd7fd3 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,13 @@ # CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) +## 2.5.12 + +### Bug Fixes +- **Removed Duplicate TCPDF Include**: Removed incorrect TCPDF include since it's already loaded by Dolibarr +- **Fixed Path Error**: Resolved "Failed opening required" error for TCPDF file +- **Clean Implementation**: TCPDF is already available through Dolibarr's standard loading +- **Stable Footer**: Custom PDF class now works without duplicate includes + ## 2.5.11 ### Bug Fixes diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index 0fd3dff..db3ace6 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -15,10 +15,6 @@ * along with this program. If not, see . */ -// Ensure TCPDF is loaded -if (!class_exists('TCPDF')) { - require_once DOL_DOCUMENT_ROOT . '/includes/tcpdf/tcpdf.php'; -} /** * Custom PDF class with footer functionality diff --git a/core/modules/modDeclarationTVA.class.php b/core/modules/modDeclarationTVA.class.php index 1f37fa0..f0d8fce 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.5.11'; + $this->version = '2.5.12'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt';