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
This commit is contained in:
Frank Cools 2025-10-02 20:52:59 +02:00
parent b9725755a2
commit 213ab61bdd
3 changed files with 29 additions and 0 deletions

View File

@ -103,6 +103,29 @@ print '<td>' . $langs->trans("CreatedDate") . '</td>';
print '<td>' . dol_print_date($declarationtva->created_date, 'dayhour') . '</td>';
print '</tr>';
// Add totals section
print '<tr>';
print '<td><strong>' . $langs->trans("TotalVATCollected") . '</strong></td>';
print '<td><strong>' . price($declarationtva->total_vat_collected) . '</strong></td>';
print '</tr>';
print '<tr>';
print '<td><strong>' . $langs->trans("TotalVATDeductible") . '</strong></td>';
print '<td><strong>' . price($declarationtva->total_vat_deductible) . '</strong></td>';
print '</tr>';
print '<tr>';
print '<td><strong>' . $langs->trans("NetVATDue") . '</strong></td>';
print '<td><strong>' . price($declarationtva->net_vat_due) . '</strong></td>';
print '</tr>';
if ($declarationtva->vat_credit > 0) {
print '<tr>';
print '<td><strong>' . $langs->trans("VATCredit") . '</strong></td>';
print '<td><strong>' . price($declarationtva->vat_credit) . '</strong></td>';
print '</tr>';
}
print '</table>';
print '</div>';

View File

@ -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

View File

@ -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