-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra dropdowns for every year in payment history #3840
base: master
Are you sure you want to change the base?
Conversation
725e5fa
to
0697211
Compare
website/payments/views.py
Outdated
@@ -145,14 +146,21 @@ def get_queryset(self) -> QuerySet: | |||
|
|||
def get_context_data(self, *args, **kwargs): | |||
filters = [] | |||
for i in range(13): | |||
|
|||
for i in range(85): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
85 is kind of a weird number?... Is it based on the legal storage period for payment info? For the user it might be nice if years in which there were no payments (or at least years before their first payment) are not shown.
… member or 7 years depends on which one is the later date.
… member or 7 years depends on which one is the later date.
current_time = timezone.now().replace(tzinfo=None) | ||
nr_months = 0 | ||
earliest_membership = self.request.member.earliest_membership | ||
difference = relativedelta(current_time, earliest_membership.since) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion that I think does not break code coverage: add if earliest_membership else None
to the end of this line, and do the same but with else 0
for nr_months
Closes #3839.
Summary
Made it so you can look through your payment history with the GUI.
How to test