From eb54e8ada6363a2b4e55ab11ffb76674c0eccd2f Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 12 Jun 2016 00:29:43 +0200 Subject: [PATCH] Fix payments order (by date, most recent first) --- refunding/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refunding/views.py b/refunding/views.py index d55d976..65bc1e4 100644 --- a/refunding/views.py +++ b/refunding/views.py @@ -85,7 +85,7 @@ def refund_delete(request, pk): @login_required def not_refunded_payments(request): - payments = Payment.objects.filter(refund=None) + payments = Payment.objects.filter(refund=None).order_by('-date') value_sum = payments.aggregate(Sum('value')).get('value__sum') if value_sum: value_sum /= 100