From 9b7c84cf0890788a08a3dec71e00cbe78748b1fb Mon Sep 17 00:00:00 2001 From: Tom Price Date: Tue, 28 Mar 2017 16:43:15 +0100 Subject: [PATCH] Change invoice filename format Change the invoice filename format to include the event number. Closes #279 --- RIGS/finance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/finance.py b/RIGS/finance.py index 1e0c91a7..26ca0df8 100644 --- a/RIGS/finance.py +++ b/RIGS/finance.py @@ -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