Categorize PayPal membership tx, increase page size, sort tx by new

This commit is contained in:
Tanner Collin 2020-02-22 05:21:33 +00:00
parent 063c7bd1f5
commit 65ffdcc00f
3 changed files with 3 additions and 2 deletions

View File

@ -143,6 +143,7 @@ def create_member_dues_tx(data, member, num_months):
**build_tx(data),
member_id=member.id,
memo=memo,
category='Membership',
number_of_membership_months=num_months,
user=user,
)

View File

@ -253,7 +253,7 @@ class TransactionViewSet(Base, List, Create, Retrieve, Update):
queryset = queryset.filter(date__year=dt.year)
queryset = queryset.filter(date__month=dt.month)
queryset = queryset.exclude(category='Memberships:Fake Months')
return queryset.order_by('date', 'id')
return queryset.order_by('-date', '-id')
elif self.action == 'list':
queryset = queryset.exclude(report_type__isnull=True)
queryset = queryset.exclude(report_type='')

View File

@ -201,7 +201,7 @@ if DEBUG:
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 100,
'PAGE_SIZE': 300,
'DEFAULT_RENDERER_CLASSES': DEFAULT_RENDERER_CLASSES,
'DEFAULT_AUTHENTICATION_CLASSES': DEFAULT_AUTHENTICATION_CLASSES,
}