Fixed waiting invoice counter - closes #239

This commit is contained in:
David Taylor
2016-06-06 23:06:30 +01:00
parent 9108cb3c4e
commit f92f418bc5
2 changed files with 2 additions and 1 deletions

View File

@@ -112,6 +112,7 @@ class InvoiceWaiting(generic.ListView):
for obj in self.get_objects():
total += obj.sum_total
context['total'] = total
context['count'] = len(self.get_objects())
return context
def get_queryset(self):

View File

@@ -15,7 +15,7 @@
{% block content %}
<div class="col-sm-12">
<h2>Events for Invoice ({{object_list|length}} Events, £ {{ total|floatformat:2 }})</h2>
<h2>Events for Invoice ({{count}} Events, £ {{ total|floatformat:2 }})</h2>
<p>These events have happened, but paperwork has not yet been sent to treasury</p>
{% if is_paginated %}
<div class="col-md-6 col-md-offset-6 col-sm-12 text-right">