From 17cc088a6ee49e29daf35429060574de08b67720 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Thu, 13 Oct 2016 09:32:30 -0700 Subject: [PATCH] =?UTF-8?q?Adds=20an=20=E2=80=9Cinvoices=E2=80=9D=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- registrasion/reporting/views.py | 15 +++++++++++++++ registrasion/urls.py | 1 + 2 files changed, 16 insertions(+) diff --git a/registrasion/reporting/views.py b/registrasion/reporting/views.py index c29d8cb9..a5784014 100644 --- a/registrasion/reporting/views.py +++ b/registrasion/reporting/views.py @@ -382,6 +382,21 @@ def credit_notes(request, form): ) +@report_view("Invoices") +def invoices(request,form): + ''' Shows all of the invoices in the system. ''' + + invoices = commerce.Invoice.objects.all().order_by("status") + + return QuerysetReport( + "Invoices", + ["id", "recipient", "value", "get_status_display"], + invoices, + headings=["id", "Recipient", "Value", "Status"], + link_view=views.invoice, + ) + + class AttendeeListReport(ListReport): def get_link(self, argument): diff --git a/registrasion/urls.py b/registrasion/urls.py index 05b10aab..0d21854c 100644 --- a/registrasion/urls.py +++ b/registrasion/urls.py @@ -49,6 +49,7 @@ reports = [ url(r"^attendee/([0-9]*)$", rv.attendee, name="attendee"), url(r"^credit_notes/?$", rv.credit_notes, name="credit_notes"), url(r"^discount_status/?$", rv.discount_status, name="discount_status"), + url(r"^invoices/?$", rv.invoices, name="invoices"), url( r"^paid_invoices_by_date/?$", rv.paid_invoices_by_date,