You are here

mortgage-calculator.html.twig in Real Estate Mortgage Calculator 8

Default implementation of a mortgage calculator result template.

Available variables:

  • rows: A rows' array containing a calculation result per month/year
  • desired_display: can contain one of values: 'monthly' or 'yearly'
  • row.number_of_payments: number of payments
  • row.payment: annual payment

File

templates/mortgage-calculator.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default implementation of a mortgage calculator result template.
  5. *
  6. * Available variables:
  7. * - rows: A rows' array containing a calculation result per month/year
  8. * - desired_display: can contain one of values: 'monthly' or 'yearly'
  9. * - row.number_of_payments: number of payments
  10. * - row.payment: annual payment
  11. *
  12. */
  13. #}
  14. {{ mortgage_calculator_form }}
  15. <table class="mortgage-calculator">
  16. <thead>
  17. <tr>
  18. <th>{{ desired_display == 'monthly'?'Month':'Year'|t }}</th>
  19. <th>{{ 'Beginning Balance'|t }}</th>
  20. <th>{{ 'Interest'|t }}</th>
  21. <th>{{ 'Annual Payment'|t }}</th>
  22. <th>{{ 'Ending Balance'|t }}</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. {% for row in rows %}
  27. <tr>
  28. {% for column in row %}
  29. <td>
  30. {{ column }}
  31. </td>
  32. {% endfor %}
  33. </tr>
  34. {% endfor %}
  35. </tbody>
  36. </table>