]> err.no Git - peojumk/commitdiff
Order invoice lists
authorTollef Fog Heen <tfheen@err.no>
Wed, 1 Aug 2012 18:58:26 +0000 (20:58 +0200)
committerTollef Fog Heen <tfheen@err.no>
Wed, 1 Aug 2012 18:58:26 +0000 (20:58 +0200)
invoice/views.py

index 3dd098fbdca25997d45a104eb8ba3218f3b56c67..6969d095d98517b2b4d3ff5fb2299558d5dd18ca 100644 (file)
@@ -17,8 +17,8 @@ from invoice.forms import ClientForm, InvoiceForm, InvoiceUpdateForm
 @login_required
 def index(request):
     clients = Client.objects.all()
-    unpaid_invoices = Invoice.objects.filter(status__in = ['N', 'S'])
-    paid_invoices = Invoice.objects.filter(status = 'P')
+    unpaid_invoices = Invoice.objects.filter(status__in = ['N', 'S']).order_by('id')
+    paid_invoices = Invoice.objects.filter(status = 'P').order_by('id')
     return render_to_response('invoice/index.html', locals())
 
 # ------------------- CLIENT ---------------