Renames “nag_unpaid” to “invoice_mailout”, better matches current intent.

This commit is contained in:
Christopher Neugebauer 2017-01-08 09:52:49 +11:00
parent de902a213d
commit 274187b8bf
4 changed files with 10 additions and 8 deletions

View file

@ -448,6 +448,7 @@ class InvoiceEmailForm(forms.Form):
product = [int(i) for i in product]
super(InvoiceEmailForm, self).__init__(*a, **k)
print status
qs = commerce.Invoice.objects.filter(
status=status or commerce.Invoice.STATUS_UNPAID,

View file

@ -593,10 +593,11 @@ def attendee_data(request, form, user_id=None):
# Add invoice nag link
links = []
links.append((
reverse(views.nag_unpaid, args=[]) + "?" + request.META["QUERY_STRING"],
"Send invoice reminders",
))
invoice_mailout = reverse(views.invoice_mailout, args=[]) + "?" + request.META["QUERY_STRING"]
links += [
(invoice_mailout + "&status=1", "Send invoice reminders",),
(invoice_mailout + "&status=2", "Send mail for paid invoices",),
]
if items.count() > 0:
output.append(Links("Actions", links))

View file

@ -12,8 +12,8 @@ from .views import (
guided_registration,
invoice,
invoice_access,
invoice_mailout,
manual_payment,
nag_unpaid,
product_category,
refund,
review,
@ -35,7 +35,7 @@ public = [
refund, name="refund"),
url(r"^invoice_access/([A-Z0-9]+)$", invoice_access,
name="invoice_access"),
url(r"^nag_unpaid$", nag_unpaid, name="nag_unpaid"),
url(r"^invoice_mailout$", invoice_mailout, name="invoice_mailout"),
url(r"^profile$", edit_profile, name="attendee_edit"),
url(r"^register$", guided_registration, name="guided_registration"),
url(r"^review$", review, name="review"),

View file

@ -926,8 +926,8 @@ Email = namedtuple(
)
@user_passes_test(_staff_only)
def nag_unpaid(request):
''' Allows staff to nag users with unpaid invoices. '''
def invoice_mailout(request):
''' Allows staff to send emails to users based on their invoice status. '''
category = request.GET.getlist("category", [])
product = request.GET.getlist("product", [])