Member payment interface change.
[fsij-members-webapp.git] / accounting / views.py
index adb0d74..194cf2d 100644 (file)
@@ -3,6 +3,7 @@ from django.shortcuts import render_to_response, get_object_or_404
 from django.contrib.auth.decorators import login_required, user_passes_test
 from django.http import HttpResponse, HttpResponseRedirect
 from fsij.accounting.models import Transaction, Account, Business, LedgerEntry, FinancialYear, GeneralLedgerEntry
+from fsij.membership.models import Member, MemberPayment
 from fsij.settings import LOGIN_URL
 import datetime, time
 
@@ -74,12 +75,13 @@ def transaction_list(request,year=None):
         fy = FinancialYear(int(year))
         tr_list = Transaction.objects.filter(date__range=(fy.begin(),fy.end())).order_by('date')
     else:
-        tr_list = Transaction.objects.all().order_by('date')
+        tr_list = Transaction.objects.all().order_by('-date')
     return render_to_response('accounting/transaction_list.html',
                               {'year' : year,
                                'tr_list': tr_list,
                                'b_list': Business.objects.all(),
                                'a_list': Account.objects.all(),
+                               'members': Member.objects.all(),
                                'original_path': request.path,
                                })