summaryrefslogtreecommitdiff
path: root/postgresqleu/membership/invoicehandler.py
AgeCommit message (Collapse)Author
2020-03-31Create abstraction for getting "today"Magnus Hagander
This will work differently for conferences and non-conferences once we add proper timezone support, so abstract it out into a separate couple of functions. For now they both return the same thing, but this will change in a later commit. In passing, fix missing datetime.now() -> timezone.now() conversions.
2019-01-26Fix typoMagnus Hagander
2019-01-19Move membership configuration to the databaseMagnus Hagander
Out of settings.py and into the database, and while at it make it possible to select which invoice methods can be used for membership invoices.
2019-01-04Fix sibling importsMagnus Hagander
Sibling imports should be prefixed with a period. Good idea in py2, will eventually become required in py3, so another small step.
2018-12-28Re-think how refunds are handledMagnus Hagander
Basically reverse the flow - instead of having the invoice system refund an invoice and trigger an action in the attached systems (such as confreg or membership) to remove something, have the actual end systems like confreg handle the cancelation and just tell the invoice system what the refund is. This makes the system a lot more flexible and makes it possible to handle things like multi-attendee invoices that get partially refunded more than once. Other than the order-reversal: 1. Each invoice can now have multiple refund notes. In doing this, the view of "refunded invoices" has also been retired, as it makes less sense now. 2. Refund notices now include a "previously refunded" section if they are anything except the first refund note, to track across multiple refunds. This creates a breaking change in the API for PDF generation, but recent other updates to the skinning broke them all anyway. 3. For confreg, implement "refund patterns". This is a set of rules with "refund x% minus fees of y" rules that can be applied when canceling a registration. They are applied to the individual costs being refunded. They can also be given a start/end date during which they should be used, which is used as a hint in the UI.
2018-12-14Fix blankline related warningsMagnus Hagander
2018-12-14Fix spacing around operatorsMagnus Hagander
2018-12-14Manual fix of further whitespace issuesMagnus Hagander
Many of these were masked with the using of tabs, but were basically incorrect all the time. It's all in places where whitespace doesn't actually matter, but let's try to match up to PEP8.
2018-12-14Replace tabs with spacesMagnus Hagander
In an effort to close up with PEP8, we should use spaces for indent rather than tabs... Time to update your editor config!
2018-09-07Fix refunding of additional options invoicesMagnus Hagander
When there is no way to automatically remove something because of a refund, don't block the refund completely. Instead allow it to go through and leave it up to the operator to manually verify.
2017-04-16Allow changing membership length and costStephen Frost
Move the number of years and the cost per renewal to the settings file, allowing others to change these values as they see fit. (Minor fixes for non-python-style code by Mangus)
2016-01-16Remove all support for mixed content (http/https)Magnus Hagander
Instead, as of now we run all content over https always. The enforcment of this is placed in the webserver, which makes it impossible to miss it on some feature. This retires the setting SITEBASE_SSL, and changes SITEBASE to be https. It also retires DISABLE_HTTPS_REDIRECTS, which has no use anymore. And finally, SESSION_COOKIE_SECURE is now set by default, and needs to be turned off in local development environments.
2013-09-28Add funcitonality to flag an invoice as refundedMagnus Hagander
This will for example remove a conference registration automatically, but most importantly it let's us keep track of our actual invoice payments properly.
2013-06-26Add support for canceling/deleting system-generated invoicesMagnus Hagander
When cancelling a confreg or memebership invoice, we need to actually unlink it from the system that generated it, and not just flag the invoice itself as deleted. Also generate an email for cancelled invoices, so the person who originally got it knows it doesn't need to be paid anymore.
2013-05-07Implement notification emails for expiring and expired membershipsMagnus Hagander
We'll send a notification email 30, 20 and 10 days before expiry, and a final message when it actually expires.
2013-04-29Rewrite SSL redirection codeMagnus Hagander
Now uses a decorator instead of manual checks inside each view. Also add SSL decorators to the new invoice and paypal code to make sure it's served over SSL. Finally, define two new settings for SITEBASE and SITEBASE_SSL to override the website names in a local sandbox install. Makes it possible to for example test the full paypal workflow, since we need to be able to pass an actual working URL to paypal in that case.
2013-04-23Reimplement membership payments on top of new invoice management codeMagnus Hagander