v2.5.26: Added declaration period to footer
- Footer now displays declaration period centered between company name and page number - Enhanced footer information with company name, declaration period, and page count - Professional PDF layout with complete footer information - Declaration period helps identify the document period - Updated module version to 2.5.26
This commit is contained in:
parent
f5829444f1
commit
8792b261f7
@ -1,5 +1,13 @@
|
||||
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
||||
|
||||
## 2.5.26
|
||||
|
||||
### Bug Fixes
|
||||
- **Added Declaration Period to Footer**: Footer now displays declaration period centered between company name and page number
|
||||
- **Enhanced Footer Information**: Footer now shows company name, declaration period, and page count
|
||||
- **Professional PDF Layout**: Complete footer with all relevant information
|
||||
- **Better Document Identification**: Declaration period helps identify the document period
|
||||
|
||||
## 2.5.25
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@ -40,12 +40,18 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
||||
{
|
||||
private $company_name = '';
|
||||
private $total_pages = 0;
|
||||
private $declaration_period = '';
|
||||
|
||||
public function setCompanyName($company_name)
|
||||
{
|
||||
$this->company_name = $company_name;
|
||||
}
|
||||
|
||||
public function setDeclarationPeriod($period)
|
||||
{
|
||||
$this->declaration_period = $period;
|
||||
}
|
||||
|
||||
public function setTotalPages($total_pages)
|
||||
{
|
||||
$this->total_pages = $total_pages;
|
||||
@ -73,6 +79,12 @@ class DeclarationTVA_CustomPDF extends TCPDF
|
||||
$this->SetXY($margin_left, $this->GetY());
|
||||
$this->Cell(0, 6, $this->company_name, 0, 0, 'L');
|
||||
|
||||
// Declaration period centered
|
||||
if (!empty($this->declaration_period)) {
|
||||
$this->SetXY($margin_left, $this->GetY());
|
||||
$this->Cell($page_width - $margin_left - $margin_right, 6, $this->declaration_period, 0, 0, 'C');
|
||||
}
|
||||
|
||||
// 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 . '/' . $this->getAliasNbPages(), 0, 0, 'R');
|
||||
@ -857,8 +869,9 @@ class DeclarationTVA_PDF
|
||||
// Create a new PDF document
|
||||
$pdf = new DeclarationTVA_CustomPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// Set company name for footer
|
||||
// Set company name and declaration period for footer
|
||||
$pdf->setCompanyName($mysoc->name);
|
||||
$pdf->setDeclarationPeriod(dol_print_date($declaration->start_date, 'day') . ' - ' . dol_print_date($declaration->end_date, 'day'));
|
||||
|
||||
// Set document information
|
||||
$pdf->SetCreator('DeclarationTVA Module');
|
||||
@ -1523,8 +1536,9 @@ class DeclarationTVA_PDF
|
||||
// Create a new PDF document
|
||||
$pdf = new DeclarationTVA_CustomPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
// Set company name for footer
|
||||
// Set company name and declaration period for footer
|
||||
$pdf->setCompanyName($mysoc->name);
|
||||
$pdf->setDeclarationPeriod(dol_print_date($declaration->start_date, 'day') . ' - ' . dol_print_date($declaration->end_date, 'day'));
|
||||
|
||||
// Set document information
|
||||
$pdf->SetCreator('DeclarationTVA Module');
|
||||
|
||||
@ -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.25';
|
||||
$this->version = '2.5.26';
|
||||
// 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