Fix payments order (by date, most recent first)

This commit is contained in:
Gabriel Augendre 2016-06-12 00:29:43 +02:00
parent 3e9c678907
commit eb54e8ada6
No known key found for this signature in database
GPG key ID: D2B6A5B41FC438B1

View file

@ -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