diff --git a/ChangeLog.md b/ChangeLog.md index ea83dbc..5e1fb1d 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/core/class/declarationtva_pdf.class.php b/core/class/declarationtva_pdf.class.php index eea2669..41a4b13 100644 --- a/core/class/declarationtva_pdf.class.php +++ b/core/class/declarationtva_pdf.class.php @@ -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); diff --git a/core/modules/modDeclarationTVA.class.php b/core/modules/modDeclarationTVA.class.php index 10cf299..7b07b0e 100644 --- a/core/modules/modDeclarationTVA.class.php +++ b/core/modules/modDeclarationTVA.class.php @@ -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';