From 213ab61bddb076f7c0789b928e9f3f156e934ad5 Mon Sep 17 00:00:00 2001 From: Frank Cools Date: Thu, 2 Oct 2025 20:52:59 +0200 Subject: [PATCH] Restore complete declaration view layout with totals Enhanced Declaration View: - Restored all declaration fields (number, name, period, status, created date) - Added totals section with VAT collected, deductible, net due, and credit - Bold formatting for totals to highlight important amounts - Added translations for all new fields - Complete layout with all necessary information --- declarationtva_view.php | 23 +++++++++++++++++++++++ langs/en_US/declarationtva.lang | 3 +++ langs/fr_FR/declarationtva.lang | 3 +++ 3 files changed, 29 insertions(+) diff --git a/declarationtva_view.php b/declarationtva_view.php index 95d848e..66b4fd8 100644 --- a/declarationtva_view.php +++ b/declarationtva_view.php @@ -103,6 +103,29 @@ print '' . $langs->trans("CreatedDate") . ''; print '' . dol_print_date($declarationtva->created_date, 'dayhour') . ''; print ''; +// Add totals section +print ''; +print '' . $langs->trans("TotalVATCollected") . ''; +print '' . price($declarationtva->total_vat_collected) . ''; +print ''; + +print ''; +print '' . $langs->trans("TotalVATDeductible") . ''; +print '' . price($declarationtva->total_vat_deductible) . ''; +print ''; + +print ''; +print '' . $langs->trans("NetVATDue") . ''; +print '' . price($declarationtva->net_vat_due) . ''; +print ''; + +if ($declarationtva->vat_credit > 0) { + print ''; + print '' . $langs->trans("VATCredit") . ''; + print '' . price($declarationtva->vat_credit) . ''; + print ''; +} + print ''; print ''; diff --git a/langs/en_US/declarationtva.lang b/langs/en_US/declarationtva.lang index 3c921d6..6e5fb0e 100644 --- a/langs/en_US/declarationtva.lang +++ b/langs/en_US/declarationtva.lang @@ -430,3 +430,6 @@ Recalculate = Recalculate DeclarationRecalculated = Declaration recalculated successfully ErrorRecalculatingDeclaration = Error recalculating declaration NoCA3Data = No CA-3 data calculated yet. Click Recalculate to calculate amounts. +TotalVATCollected = Total VAT Collected +TotalVATDeductible = Total VAT Deductible +VATCredit = VAT Credit diff --git a/langs/fr_FR/declarationtva.lang b/langs/fr_FR/declarationtva.lang index a17628e..6669a83 100644 --- a/langs/fr_FR/declarationtva.lang +++ b/langs/fr_FR/declarationtva.lang @@ -419,3 +419,6 @@ Recalculate = Recalculer DeclarationRecalculated = Déclaration recalculée avec succès ErrorRecalculatingDeclaration = Erreur lors du recalcul de la déclaration NoCA3Data = Aucune donnée CA-3 calculée. Cliquez sur Recalculer pour calculer les montants. +TotalVATCollected = TVA Collectée Totale +TotalVATDeductible = TVA Déductible Totale +VATCredit = Crédit de TVA