v2.5.22: Enhanced footer with total page count

- Footer now displays 'Page X/Y' format (e.g., 'Page 1/7')
- Professional PDF layout with total page count for better document navigation
- Users can now see current page and total pages in footer
- Enhanced footer provides complete page information
- Updated module version to 2.5.22
This commit is contained in:
Frank Cools 2025-10-08 13:09:50 +02:00
parent 3da77d0e3f
commit a8b2f19bae
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,13 @@
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
## 2.5.22
### Bug Fixes
- **Enhanced Footer with Total Pages**: Footer now displays "Page X/Y" format (e.g., "Page 1/7")
- **Professional PDF Layout**: Added total page count to footer for better document navigation
- **Improved User Experience**: Users can now see current page and total pages in footer
- **Better Document Management**: Enhanced footer provides complete page information
## 2.5.21
### Bug Fixes

View File

@ -50,8 +50,9 @@ class DeclarationTVA_CustomPDF extends TCPDF
// Set font size 7 (same as summary information)
$this->SetFont('helvetica', '', 7);
// Get current page number
// Get current page number and total pages
$page_number = $this->getPage();
$total_pages = $this->getNumPages();
// Get page width for positioning
$page_width = $this->getPageWidth();
@ -62,9 +63,10 @@ class DeclarationTVA_CustomPDF extends TCPDF
$this->SetXY($margin_left, $this->GetY());
$this->Cell(0, 6, $this->company_name, 0, 0, 'L');
// Page number on the right
$this->SetXY($page_width - $margin_right - 20, $this->GetY());
$this->Cell(20, 6, 'Page ' . $page_number, 0, 0, 'R');
// Page number with total pages on the right (e.g., "Page 1/7")
$page_text = 'Page ' . $page_number . '/' . $total_pages;
$this->SetXY($page_width - $margin_right - 30, $this->GetY());
$this->Cell(30, 6, $page_text, 0, 0, 'R');
}
}

View File

@ -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.21';
$this->version = '2.5.22';
// Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';