{% extends 'base.html' %}

{% block content %}
  <h1>Trial Balance</h1>
  <table>
    <thead>
      <tr>
        <th>Account Number</th>
        <th>Account Name</th>
        <th>Debit</th>
        <th>Credit</th>
      </tr>
    </thead>
    <tbody>
      {% for item in report_data %}
        <tr>
          <td>{{ item.number }}</td>
          <td>{{ item.name }}</td>
          <td>{{ item.debit }}</td>
          <td>{{ item.credit }}</td>
        </tr>
      {% endfor %}
    </tbody>
    <tfoot>
      <tr>
        <td colspan="2"><strong>Total</strong></td>
        <td><strong>{{ total_debits }}</strong></td>
        <td><strong>{{ total_credits }}</strong></td>
      </tr>
    </tfoot>
  </table>
{% endblock %}
