From f92f418bc5cff671930a52bdab319cc8704553c1 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 6 Jun 2016 23:06:30 +0100 Subject: [PATCH] Fixed waiting invoice counter - closes #239 --- RIGS/finance.py | 1 + RIGS/templates/RIGS/event_invoice.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RIGS/finance.py b/RIGS/finance.py index 1fd9b535..75de8bd9 100644 --- a/RIGS/finance.py +++ b/RIGS/finance.py @@ -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): diff --git a/RIGS/templates/RIGS/event_invoice.html b/RIGS/templates/RIGS/event_invoice.html index 0e56158f..3136fe40 100644 --- a/RIGS/templates/RIGS/event_invoice.html +++ b/RIGS/templates/RIGS/event_invoice.html @@ -15,7 +15,7 @@ {% block content %}
-

Events for Invoice ({{object_list|length}} Events, £ {{ total|floatformat:2 }})

+

Events for Invoice ({{count}} Events, £ {{ total|floatformat:2 }})

These events have happened, but paperwork has not yet been sent to treasury

{% if is_paginated %}