35 lines
985 B
HTML
35 lines
985 B
HTML
{% load bornhack %}
|
|
{% if invoice_list %}
|
|
<table class="table table-hover datatable">
|
|
<thead>
|
|
<tr>
|
|
<th>Invoice #</th>
|
|
<th>Customer</th>
|
|
<th>Invoice Date</th>
|
|
<th>Amount</th>
|
|
<th>Order</th>
|
|
<th>Paid</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for invoice in invoice_list %}
|
|
<tr>
|
|
<td>{{ invoice.id }}</td>
|
|
<td>{% if invoice.order %}{{ invoice.order.user.username }} <{{ invoice.order.user.email }}>{% else %}{{ invoice.customorder.customer }}{% endif %}</td>
|
|
<td>{{ invoice.created|date }}</td>
|
|
<td>{% if invoice.order %}{{ invoice.order.total }} DKK{% else %}{{ invoice.customorder.amount }}{% endif %}</td>
|
|
<td>{{ invoice.get_order }}</td>
|
|
<td>{{ invoice.get_order.paid|truefalseicon }} {% if invoice.get_order.paid %}paid{% else %}unpaid{% endif %}</td>
|
|
<td>
|
|
n/a
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<h4>No invoices found.</h4>
|
|
{% endif %}
|
|
|