v2.5.23: Fixed footer page count using TCPDF placeholder
- Now uses TCPDF's {nb} placeholder for accurate total page count
- Footer now shows proper 'Page X/Y' format with correct total pages
- Fixed issue where total pages showed same as current page
- Footer now displays correct total page count using TCPDF's built-in mechanism
- Updated module version to 2.5.23
This commit is contained in:
parent
a8b2f19bae
commit
7f7aa5a9fc
@ -1,5 +1,13 @@
|
|||||||
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
||||||
|
|
||||||
|
## 2.5.23
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- **Fixed Footer Page Count**: Now uses TCPDF's {nb} placeholder for accurate total page count
|
||||||
|
- **Correct Page Display**: Footer now shows proper "Page X/Y" format with correct total pages
|
||||||
|
- **Professional PDF Layout**: Fixed issue where total pages showed same as current page
|
||||||
|
- **Accurate Page Information**: Footer now displays correct total page count
|
||||||
|
|
||||||
## 2.5.22
|
## 2.5.22
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@ -50,9 +50,8 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
|||||||
// Set font size 7 (same as summary information)
|
// Set font size 7 (same as summary information)
|
||||||
$this->SetFont('helvetica', '', 7);
|
$this->SetFont('helvetica', '', 7);
|
||||||
|
|
||||||
// Get current page number and total pages
|
// Get current page number
|
||||||
$page_number = $this->getPage();
|
$page_number = $this->getPage();
|
||||||
$total_pages = $this->getNumPages();
|
|
||||||
|
|
||||||
// Get page width for positioning
|
// Get page width for positioning
|
||||||
$page_width = $this->getPageWidth();
|
$page_width = $this->getPageWidth();
|
||||||
@ -63,10 +62,9 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
|||||||
$this->SetXY($margin_left, $this->GetY());
|
$this->SetXY($margin_left, $this->GetY());
|
||||||
$this->Cell(0, 6, $this->company_name, 0, 0, 'L');
|
$this->Cell(0, 6, $this->company_name, 0, 0, 'L');
|
||||||
|
|
||||||
// Page number with total pages on the right (e.g., "Page 1/7")
|
// Page number with total pages on the right using TCPDF's {nb} placeholder
|
||||||
$page_text = 'Page ' . $page_number . '/' . $total_pages;
|
|
||||||
$this->SetXY($page_width - $margin_right - 30, $this->GetY());
|
$this->SetXY($page_width - $margin_right - 30, $this->GetY());
|
||||||
$this->Cell(30, 6, $page_text, 0, 0, 'R');
|
$this->Cell(30, 6, 'Page ' . $page_number . '/{nb}', 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'
|
$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'
|
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
|
||||||
$this->version = '2.5.22';
|
$this->version = '2.5.23';
|
||||||
// Url to the file with your last numberversion of this module
|
// Url to the file with your last numberversion of this module
|
||||||
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user