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';