put the latest invoice number at the top of the file

This commit is contained in:
Thomas Steen Rasmussen 2021-08-11 09:47:21 +02:00
parent b0656ff911
commit 8b7807b88b
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ class InvoiceListCSVView(CampViewMixin, EconomyTeamPermissionMixin, ListView):
] = f'attachment; filename="bornhack-infoices-{timezone.now()}.csv"'
writer = csv.writer(response)
writer.writerow(["invoice", "invoice_date", "amount_dkk", "order", "paid"])
for invoice in Invoice.objects.all():
for invoice in Invoice.objects.all().order_by("-id"):
writer.writerow(
[
invoice.id,