v2.5.3: Perfect table styling consistency across all PDF pages

- Updated detailed page tables to match first page font sizes exactly
- All tables now use identical styling (font size 7, proper spacing)
- Detailed page tables now look identical to journal tables
- Consistent typography and spacing throughout the entire PDF
- Updated module version to 2.5.3
This commit is contained in:
Frank Cools 2025-10-08 12:27:10 +02:00
parent 33897b335e
commit cc5ab9a062
3 changed files with 22 additions and 14 deletions

View File

@ -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.3
### UI/UX Improvements
- **Font Size Consistency**: Updated detailed page tables to match first page font sizes exactly
- **Perfect Table Matching**: All tables now use identical styling (font size 7, proper spacing)
- **Professional Appearance**: Detailed page tables now look identical to journal tables
- **Visual Harmony**: Consistent typography and spacing throughout the entire PDF
## 2.5.2 ## 2.5.2
### UI/UX Improvements ### UI/UX Improvements

View File

@ -1086,8 +1086,8 @@ class DeclarationTVA_PDF
// Set X position to center the table // Set X position to center the table
$pdf->SetX($start_x); $pdf->SetX($start_x);
// Table header with light gray background // Table header with light gray background (matching first page style)
$pdf->SetFont('helvetica', 'B', 10); $pdf->SetFont('helvetica', 'B', 8);
$pdf->SetFillColor(240, 240, 240); // Light gray background $pdf->SetFillColor(240, 240, 240); // Light gray background
$pdf->Cell(35, 8, 'Code compte', 1, 0, 'C', true); $pdf->Cell(35, 8, 'Code compte', 1, 0, 'C', true);
$pdf->Cell(80, 8, 'Libellé compte', 1, 0, 'C', true); $pdf->Cell(80, 8, 'Libellé compte', 1, 0, 'C', true);
@ -1102,17 +1102,17 @@ class DeclarationTVA_PDF
// Display BASE accounts first (if any) // Display BASE accounts first (if any)
if (!empty($base_accounts)) { if (!empty($base_accounts)) {
$pdf->SetFont('helvetica', 'B', 9); $pdf->SetFont('helvetica', 'B', 7);
$pdf->SetFillColor(245, 245, 245); // Light gray background $pdf->SetFillColor(245, 245, 245); // Light gray background
$pdf->Cell(0, 6, 'Comptes de base (ventes)', 1, 1, 'L', true); $pdf->Cell(0, 6, 'Comptes de base (ventes)', 1, 1, 'L', true);
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
foreach ($base_accounts as $account) { foreach ($base_accounts as $account) {
$total_base_base += $account['base_amount']; $total_base_base += $account['base_amount'];
$total_vat_base += $account['vat_amount']; $total_vat_base += $account['vat_amount'];
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
$pdf->SetFillColor(255, 255, 255); // White background for data rows $pdf->SetFillColor(255, 255, 255); // White background for data rows
$pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true); $pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true);
$pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true); $pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true);
@ -1120,7 +1120,7 @@ class DeclarationTVA_PDF
} }
// Subtotal for BASE accounts // Subtotal for BASE accounts
$pdf->SetFont('helvetica', 'B', 9); $pdf->SetFont('helvetica', 'B', 7);
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFillColor(248, 248, 248); // Light gray for subtotal $pdf->SetFillColor(248, 248, 248); // Light gray for subtotal
$pdf->Cell(115, 6, 'Sous-total comptes de base', 1, 0, 'L', true); $pdf->Cell(115, 6, 'Sous-total comptes de base', 1, 0, 'L', true);
@ -1130,17 +1130,17 @@ class DeclarationTVA_PDF
// Display VAT accounts second (if any) // Display VAT accounts second (if any)
if (!empty($vat_accounts)) { if (!empty($vat_accounts)) {
$pdf->SetFont('helvetica', 'B', 9); $pdf->SetFont('helvetica', 'B', 7);
$pdf->SetFillColor(245, 245, 245); // Light gray background $pdf->SetFillColor(245, 245, 245); // Light gray background
$pdf->Cell(0, 6, 'Comptes de TVA', 1, 1, 'L', true); $pdf->Cell(0, 6, 'Comptes de TVA', 1, 1, 'L', true);
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
foreach ($vat_accounts as $account) { foreach ($vat_accounts as $account) {
$total_base_vat += $account['base_amount']; $total_base_vat += $account['base_amount'];
$total_vat_vat += $account['vat_amount']; $total_vat_vat += $account['vat_amount'];
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
$pdf->SetFillColor(255, 255, 255); // White background for data rows $pdf->SetFillColor(255, 255, 255); // White background for data rows
$pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true); $pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true);
$pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true); $pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true);
@ -1148,7 +1148,7 @@ class DeclarationTVA_PDF
} }
// Subtotal for VAT accounts // Subtotal for VAT accounts
$pdf->SetFont('helvetica', 'B', 9); $pdf->SetFont('helvetica', 'B', 7);
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFillColor(248, 248, 248); // Light gray for subtotal $pdf->SetFillColor(248, 248, 248); // Light gray for subtotal
$pdf->Cell(115, 6, 'Sous-total comptes de TVA', 1, 0, 'L', true); $pdf->Cell(115, 6, 'Sous-total comptes de TVA', 1, 0, 'L', true);
@ -1158,13 +1158,13 @@ class DeclarationTVA_PDF
// Display other accounts (normal lines) // Display other accounts (normal lines)
if (!empty($other_accounts)) { if (!empty($other_accounts)) {
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
foreach ($other_accounts as $account) { foreach ($other_accounts as $account) {
$total_base_other += $account['base_amount']; $total_base_other += $account['base_amount'];
$total_vat_other += $account['vat_amount']; $total_vat_other += $account['vat_amount'];
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFont('helvetica', '', 9); $pdf->SetFont('helvetica', '', 7);
$pdf->SetFillColor(255, 255, 255); // White background for data rows $pdf->SetFillColor(255, 255, 255); // White background for data rows
$pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true); $pdf->Cell(35, 6, $account['account_code'], 1, 0, 'C', true);
$pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true); $pdf->Cell(80, 6, $this->truncateText($account['account_label'], 35), 1, 0, 'L', true);
@ -1173,7 +1173,7 @@ class DeclarationTVA_PDF
// Total for other accounts // Total for other accounts
if (!empty($other_accounts)) { if (!empty($other_accounts)) {
$pdf->SetFont('helvetica', 'B', 9); $pdf->SetFont('helvetica', 'B', 7);
$pdf->SetX($start_x); $pdf->SetX($start_x);
$pdf->SetFillColor(248, 248, 248); // Light gray for total $pdf->SetFillColor(248, 248, 248); // Light gray for total
$pdf->Cell(115, 6, 'Total', 1, 0, 'L', true); $pdf->Cell(115, 6, 'Total', 1, 0, 'L', true);

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' $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.2'; $this->version = '2.5.3';
// 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';