v2.5.17: Fixed line 08 amount display for mixed amount types

- Now shows separate base and VAT amounts for lines 08, 09, 9B
- Resume displays 'Montant de base: X | Montant de TVA: Y' for mixed amount lines
- More accurate amount display in PDF detailed pages
- Clear distinction between base and VAT amounts in line summaries
- Special handling for lines with both base and VAT amounts
- Updated module version to 2.5.17
This commit is contained in:
Frank Cools 2025-10-08 12:58:52 +02:00
parent 68767840ac
commit 61b9a7d203
3 changed files with 17 additions and 2 deletions

View File

@ -1,5 +1,13 @@
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
## 2.5.17
### Bug Fixes
- **Fixed Line 08 Amount Display**: Now shows separate base and VAT amounts for lines 08, 09, 9B
- **Improved Amount Summary**: Resume now displays "Montant de base: X | Montant de TVA: Y" for mixed amount lines
- **Better Amount Breakdown**: More accurate amount display in PDF detailed pages
- **Enhanced Clarity**: Clear distinction between base and VAT amounts in line summaries
## 2.5.16
### Bug Fixes

View File

@ -1098,7 +1098,14 @@ class DeclarationTVA_PDF
if (!empty($line_details['calculated_line'])) {
$calc = $line_details['calculated_line'];
$pdf->Cell(0, 6, 'Montant calculé: ' . price($calc->vat_amount, 0, '', 1, 0), 0, 1);
// Special handling for lines with both base and VAT amounts (08, 09, 9B)
if (in_array($line_code, array('08', '09', '9B'))) {
$pdf->Cell(0, 6, 'Montant de base: ' . price($calc->base_amount, 0, '', 1, 0) . ' | Montant de TVA: ' . price($calc->vat_amount, 0, '', 1, 0), 0, 1);
} else {
// Standard VAT amount for other lines
$pdf->Cell(0, 6, 'Montant calculé: ' . price($calc->vat_amount, 0, '', 1, 0), 0, 1);
}
}
$pdf->Ln(10);

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