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,