From 024bc785f3e2eca5878070cfc3752f52a24388a1 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Wed, 8 Oct 2025 12:51:17 +0200 Subject: [PATCH] v2.5.14: Fixed company information in PDF footer - Now uses main company entity (1) instead of current entity - PDF footer now shows the actual Dolibarr company, not first client - Uses main company entity for consistent company information - Company name in PDF footer now matches the actual Dolibarr company - Updated module version to 2.5.14 --- ChangeLog.md | 8 ++++++++ core/class/declarationtva_pdf.class.php | 8 ++++---- core/modules/modDeclarationTVA.class.php | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 2402bde..709eee5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,13 @@ # CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org) +## 2.5.14 + +### Bug Fixes +- **Fixed Company Information**: Now uses main company entity (1) instead of current entity +- **Correct Company Data**: PDF footer now shows the actual Dolibarr company, not first client +- **Proper Entity Selection**: Uses main company entity for consistent company information +- **Accurate Footer**: Company name in PDF footer now matches the actual Dolibarr company + ## 2.5.13 ### Bug Fixes diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index ea43f2f..3ac2eec 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -159,9 +159,9 @@ class DeclarationTVA_PDF return false; } - // Get company information + // Get company information - use main company entity (1) instead of current entity $company = new Societe($this->db); - $company->fetch($conf->entity); + $company->fetch(1); // Main company entity // Generate PDF filename $filename = 'CA3_' . $declaration->declaration_number . '_' . date('Y-m-d') . '.pdf'; @@ -216,9 +216,9 @@ class DeclarationTVA_PDF return false; } - // Get company information + // Get company information - use main company entity (1) instead of current entity $company = new Societe($this->db); - $company->fetch($conf->entity); + $company->fetch(1); // Main company entity // Generate PDF filename $filename = 'CA3_' . $declaration->declaration_number . '_' . date('Y-m-d') . '.pdf'; diff --git a/core/modules/modDeclarationTVA.class.php b/core/modules/modDeclarationTVA.class.php index 9dc778a..6f251a6 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.13'; + $this->version = '2.5.14'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt';