Change invoice filename format

Change the invoice filename format to include the event number.

Closes #279
This commit is contained in:
Tom Price
2017-03-28 16:43:15 +01:00
parent 3269e92ef2
commit 9b7c84cf08

View File

@@ -78,7 +78,7 @@ class InvoicePrint(generic.View):
escapedEventName = re.sub('[^a-zA-Z0-9 \n\.]', '', object.name)
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = "filename=Invoice %05d | %s.pdf" % (invoice.pk, escapedEventName)
response['Content-Disposition'] = "filename=Invoice %05d - N%05d | %s.pdf" % (invoice.pk, invoice.event.pk, escapedEventName)
response.write(pdfData)
return response