resumen_saldos_mensuales.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% load range_filters %}
  2. <!DOCTYPE html>
  3. <html lang="es">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>Resumen de Saldos Mensuales</title>
  7. <style>
  8. table { border-collapse: collapse; width: 100%; }
  9. th, td { border: 1px solid #ccc; padding: 8px; text-align: right; }
  10. th:first-child, td:first-child { text-align: left; }
  11. </style>
  12. </head>
  13. <body>
  14. <h1>Resumen de Saldos Mensuales</h1>
  15. <table>
  16. <thead>
  17. <tr>
  18. <th>Cuenta</th>
  19. {% for anio, mes in meses %}
  20. <th>{{ mes }}/{{ anio }}</th>
  21. {% endfor %}
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {% for cuenta in cuentas %}
  26. <tr>
  27. <td>{{ cuenta.nombre }}</td>
  28. {% for anio, mes in meses %}
  29. {% get_saldo saldos_mensuales cuenta.id anio mes as saldo %}
  30. <td class="text-end">{{ saldo|floatformat:2 }} €</td>
  31. {% endfor %}
  32. </tr>
  33. {% endfor %}
  34. </tbody>
  35. </table>
  36. </body>
  37. </html>