Commit graph

105 commits

Author SHA1 Message Date
Christopher Neugebauer
0b306fd59e Adds test for user being a primary presenter of a proposal 2016-09-04 13:41:49 +10:00
Christopher Neugebauer
b3d86e2148 Adds stub for SpeakerConditionController 2016-09-04 12:39:52 +10:00
Christopher Neugebauer
43649002cb Makes ProductCondition work if you have both valid and cancelled instances of a product. Fixes #68 2016-09-03 16:18:27 +10:00
Christopher Neugebauer
84c40a1e1f Refactors ItemController, add items_released 2016-09-03 15:08:25 +10:00
Christopher Neugebauer
1e6c90163d Fixes #64 2016-09-03 11:46:24 +10:00
Christopher Neugebauer
68aa9b067b Factors items_pending and items_purchased into ItemController 2016-09-02 15:57:20 +10:00
Christopher Neugebauer
64ca477cb8 Fixes flake8 snafus 2016-09-02 11:43:27 +10:00
Christopher Neugebauer
0b7396c40f Discount line items now describe the product that the discount applies to. 2016-08-24 11:46:15 +10:00
Christopher Neugebauer
4f16e4b9d0 Oops. 2016-08-21 18:28:16 +10:00
Christopher Neugebauer
7bf372f92a Invoices now send e-mails when created, paid, or refunded. 2016-08-21 17:14:19 +10:00
Christopher Neugebauer
e946af0f04 Adds functions for mailing invoices when certain events occur. 2016-08-21 16:56:05 +10:00
Christopher Neugebauer
de83015776 Fixes ordering error in error display 2016-05-02 10:55:29 +10:00
Christopher Neugebauer
abe8c12b05 Simplifies flag and discount filter functions 2016-05-01 19:12:40 +10:00
Christopher Neugebauer
b9b50c6846 Bug fixes and query optimisations in flag.py and discount.py 2016-05-01 14:56:51 +10:00
Christopher Neugebauer
9ca25e5986 Makes sure that the cache is not disturbed by calling end_batch 2016-05-01 14:56:51 +10:00
Christopher Neugebauer
efb73e7a68 Memoises everything else that needs to be memoised. 2016-05-01 14:56:51 +10:00
Christopher Neugebauer
3d635521eb CartController now uses BatchController memoisation 2016-05-01 14:56:51 +10:00
Christopher Neugebauer
5929c0af3c Adds end_batch functionality 2016-05-01 14:56:45 +10:00
Christopher Neugebauer
a267b60eb9 Makes memoise work properly 2016-05-01 14:56:45 +10:00
Christopher Neugebauer
ddedf54c42 Adds batch context manager behaviour 2016-05-01 10:47:06 +10:00
Christopher Neugebauer
78a41970ea Adds design for BatchController 2016-05-01 10:47:06 +10:00
Christopher Neugebauer
162a1f23dd _filtered_discounts is now called _filtered_clauses, and it no longer cares about specific products or categories 2016-05-01 09:43:32 +10:00
Christopher Neugebauer
b3491cab8e _filtered_flags now no longer cares about products for filtering. It just does everything. 2016-04-30 20:42:41 +10:00
Christopher Neugebauer
c6fdfa496e Replaces CategoryController.attach_user_remainders with user_remainders 2016-04-30 20:30:44 +10:00
Christopher Neugebauer
941caa30d9 Replaces ProductController.attach_user_remainders with ProductController.user_remainders 2016-04-30 20:30:21 +10:00
Christopher Neugebauer
b40505117f Fixes flake8 errors arising from rebase 2016-04-29 11:22:56 +10:00
Christopher Neugebauer
135f2fb47b Refactors discounts validation in terms of available_discounts 2016-04-29 11:16:40 +10:00
Christopher Neugebauer
4eff8194f9 Reduces CartController re-loading when batching operations 2016-04-29 11:16:40 +10:00
Christopher Neugebauer
02fe88a4e4 Tests and fixes for a bug where discount quantities did not respect per-line item quantities. 2016-04-29 11:11:59 +10:00
Christopher Neugebauer
6d52a4c18f More low-hanging query optimisations 2016-04-29 11:11:26 +10:00
Christopher Neugebauer
4fb569d935 Does more select_related and bulk_create calls 2016-04-29 11:10:20 +10:00
Christopher Neugebauer
a79ad3520e Puts attach_remainders on ProductController and CategoryController, eliminating the need to query each product and category separately. 2016-04-29 11:09:34 +10:00
Christopher Neugebauer
587e6e20b2 Adds an operations_batch context manager that allows batches of modifying operations to be nested. Closes #44. 2016-04-29 11:08:45 +10:00
Christopher Neugebauer
162db24817 Flake8 fixes 2016-04-29 11:08:45 +10:00
Christopher Neugebauer
71de0df5dc Makes DiscountController a class and puts available_discounts inside it 2016-04-29 11:08:42 +10:00
Christopher Neugebauer
145fd057ac Breaks out flag-handling code into flag.py and FlagController 2016-04-29 11:07:52 +10:00
Christopher Neugebauer
3f1be0e14e Rearchitected condition processing such that multiple conditions are processed by the database, in bulk. Closes #42. 2016-04-29 11:06:58 +10:00
Christopher Neugebauer
8afb31a118 Flake8 fix 2016-04-26 13:56:10 +10:00
Christopher Neugebauer
63d15a6be3 More view documentation 2016-04-26 10:52:56 +10:00
Christopher Neugebauer
cbecbf9a41 Tidies up some docs 2016-04-25 18:50:09 +10:00
Christopher Neugebauer
fd751b4ea1 Removes print statement 2016-04-25 18:32:36 +10:00
Christopher Neugebauer
4cdbdb71ce flake8 fixes 2016-04-25 17:37:33 +10:00
Christopher Neugebauer
b709da97f1 Checks that required category constraints are met before letting you check out your cart.
Closes #35
2016-04-25 17:13:58 +10:00
Christopher Neugebauer
a69d3f051e Makes cart amendment methods fail if the cart is no longer active.
Closes #16
2016-04-25 17:13:11 +10:00
Christopher Neugebauer
63dfd353c1 Replaces active/released flags in Cart with a single int flag. Closes #41 2016-04-25 15:36:55 +10:00
Christopher Neugebauer
c0b0ae780d Removes confusingness from cart.py 2016-04-25 13:20:48 +10:00
Christopher Neugebauer
12e04c248f Credit notes are now generated when invoices are overpaid, or invoices are paid into void or refunded invoices. Closes #37. 2016-04-25 08:26:54 +10:00
Christopher Neugebauer
ca8f67c2f3 Adds for_id, which lets you get an InvoiceController or CreditNoteController by the ID of the invoice/credit note/. Closes #38. 2016-04-25 07:20:41 +10:00
Christopher Neugebauer
875f736d67 Consolidates models.py into a directory module. 2016-04-22 15:06:24 +10:00
Christopher Neugebauer
c24b9ee213 Makes EnablingConditionBase a minimal reification of an abstract base model FlagBase, replaces enablingconditionbase with flagbase where possible, and fixes method names and documentation 2016-04-12 08:42:22 +10:00