{% extends 'base.html' %}

{% block content %}
  <h1>Invoices</h1>
  <table class="table">
    <thead>
      <tr>
        <th>Invoice #</th>
        <th>Customer</th>
        <th>Date</th>
        <th>Due Date</th>
        <th>Total</th>
        <th>Paid</th>
      </tr>
    </thead>
    <tbody>
      {% for invoice in invoices %}
        <tr>
          <td>{{ invoice.id }}</td>
          <td>{{ invoice.customer_name }}</td>
          <td>{{ invoice.invoice_date }}</td>
          <td>{{ invoice.due_date }}</td>
          <td>${{ invoice.total_amount }}</td>
          <td>{{ invoice.paid|yesno:"Yes,No" }}</td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}
