Adds balance due to invoice template.

Fixes #10.
This commit is contained in:
Christopher Neugebauer 2016-09-16 09:40:53 +10:00
parent a0e0a142e4
commit c05deeb26c

View file

@ -29,18 +29,29 @@
<td>{{ line_item.description }}</td>
<td class="text-right">{{ line_item.quantity }}</td>
<td class="text-right">${{ line_item.price }}</td>
<td class="text-right">${{ line_item.price|multiply:line_item.quantity }}</td>
<td class="text-right">${{ line_item.total_price }}</td>
</tr>
{% endfor %}
<tr>
<th>TOTAL</th>
<td></td>
<td></td>
<th colspan="3">TOTAL</th>
<td class="text-right">${{ invoice.value }}</td>
</tr>
</table>
<table class="table table-striped">
<tr>
<td colspan="3">Total payments:</td>
<td class="text-right">${{ invoice.total_payments }}</td>
</tr>
<tr>
<td colspan="3">Balance due:</td>
<td class="text-right">${{ invoice.balance_due }}</td>
</tr>
</table>
{% if invoice.paymentbase_set.all %}
<h4>Payments received</h4>
{% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %}
<h4>Payments received</h4>
{% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %}
{% endif %}