From c05deeb26c5b0c507af11f01ea23a64b255d3b23 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Fri, 16 Sep 2016 09:40:53 +1000 Subject: [PATCH] Adds balance due to invoice template. Fixes #10. --- .../registrasion/_invoice_details.html | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pinaxcon/templates/registrasion/_invoice_details.html b/pinaxcon/templates/registrasion/_invoice_details.html index 7db9746..cfd18cb 100644 --- a/pinaxcon/templates/registrasion/_invoice_details.html +++ b/pinaxcon/templates/registrasion/_invoice_details.html @@ -29,18 +29,29 @@ {{ line_item.description }} {{ line_item.quantity }} ${{ line_item.price }} - ${{ line_item.price|multiply:line_item.quantity }} + ${{ line_item.total_price }} {% endfor %} + - TOTAL - - + TOTAL ${{ invoice.value }} + + + + + + + + + + +
Total payments:${{ invoice.total_payments }}
Balance due:${{ invoice.balance_due }}
+ {% if invoice.paymentbase_set.all %} -

Payments received

-{% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %} +

Payments received

+ {% include "registrasion/payment_list.html" with payments=invoice.paymentbase_set.all %} {% endif %}