v2.5.25: Fixed footer page count using TCPDF alias system
- Now uses TCPDF's alias system for proper total page count - Footer now shows proper 'Page X/Y' format with accurate total pages - Fixed issue where total pages were showing as current page - Added getAliasNbPages() method override for correct page counting - Footer now displays correct total page count using TCPDF's alias system - Updated module version to 2.5.25
This commit is contained in:
parent
5f88a478a2
commit
f5829444f1
@ -1,5 +1,13 @@
|
||||
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
||||
|
||||
## 2.5.25
|
||||
|
||||
### Bug Fixes
|
||||
- **Fixed Footer Page Count with Alias System**: Now uses TCPDF's alias system for proper total page count
|
||||
- **Correct Page Display**: Footer now shows proper "Page X/Y" format with accurate total pages
|
||||
- **Professional PDF Layout**: Fixed issue where total pages were showing as current page
|
||||
- **Accurate Page Information**: Footer now displays correct total page count using getAliasNbPages() method
|
||||
|
||||
## 2.5.24
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -51,6 +51,11 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
||||
$this->total_pages = $total_pages;
|
||||
}
|
||||
|
||||
public function getAliasNbPages()
|
||||
{
|
||||
return $this->total_pages > 0 ? $this->total_pages : parent::getAliasNbPages();
|
||||
}
|
||||
|
||||
public function Footer()
|
||||
{
|
||||
// Set font size 7 (same as summary information)
|
||||
@ -68,10 +73,9 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
||||
$this->SetXY($margin_left, $this->GetY());
|
||||
$this->Cell(0, 6, $this->company_name, 0, 0, 'L');
|
||||
|
||||
// Page number with total pages on the right
|
||||
$total_pages = $this->total_pages > 0 ? $this->total_pages : $this->getNumPages();
|
||||
// Page number with total pages on the right using alias system
|
||||
$this->SetXY($page_width - $margin_right - 30, $this->GetY());
|
||||
$this->Cell(30, 6, 'Page ' . $page_number . '/' . $total_pages, 0, 0, 'R');
|
||||
$this->Cell(30, 6, 'Page ' . $page_number . '/' . $this->getAliasNbPages(), 0, 0, 'R');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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.24';
|
||||
$this->version = '2.5.25';
|
||||
// Url to the file with your last numberversion of this module
|
||||
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user