Commit graph

68 commits

Author SHA1 Message Date
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
924906d38c Adds test for e-mails being sent when invoices are generated. 2016-08-21 16:56:15 +10:00
Christopher Neugebauer
155f6d42d9 Renames patch_datetime to patches, adds e-mail patching bits 2016-08-21 16:39:57 +10:00
Christopher Neugebauer
3717adb262 Squash this and last two 2016-05-01 14:56:46 +10:00
Christopher Neugebauer
ad2de6e9d4 Breaks cart batching tests into multiple tests 2016-05-01 14:56:46 +10:00
Christopher Neugebauer
94ceaa3bb1 Adds test case for CartController batching 2016-05-01 14:56:46 +10:00
Christopher Neugebauer
3db1256895 Adds test for end_batch functionality 2016-05-01 14:56:45 +10:00
Christopher Neugebauer
27ab44ec44 test cases for memoisation 2016-05-01 10:47:15 +10:00
Christopher Neugebauer
eb29e7cd09 Adds test cases for basic batch cacheing behaviour 2016-05-01 10:47:06 +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
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
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
7ccfaed304 Removes line that forces segfault avoidance 2016-04-25 18:50:09 +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
e2687cfa6f Stops testing using ManualPayment, and just uses PaymentBase instead 2016-04-25 16:45:42 +10:00
Christopher Neugebauer
397ba207bb Adds utility to defeat segfaults in tests. Hopefully you won’t need it. 2016-04-25 15:36:55 +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
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
9a4574ef2c DRYs up test_invoice a bit 2016-04-25 08:25:19 +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
Christopher Neugebauer
638ec26126 Replaces the mandatory/non-mandatory concept with the enabled_if_true/disabled_if_false concept. Closes #4. 2016-04-11 20:48:18 +10:00
Christopher Neugebauer
e88a287fef renames test_enabling_condition to test_flag 2016-04-11 17:59:20 +10:00
Christopher Neugebauer
7b476fd5cb s/enabling_condition/flag 2016-04-11 17:56:11 +10:00
Christopher Neugebauer
4fedc73304 Renames EnablingCondition to Flag where possible 2016-04-11 17:55:00 +10:00
Christopher Neugebauer
6b10a0a7e4 Adds CreditNote, CreditNoteController, related models, and tests. 2016-04-11 13:11:56 +10:00
Christopher Neugebauer
ae8f39381f Flake8 fixes 2016-04-08 19:49:18 +10:00
Christopher Neugebauer
2fbe789090 Adds validate_allowed_to_pay(), which validates whether you’re allowed to pay for an invoice 2016-04-07 18:26:31 +10:00
Christopher Neugebauer
0e80e0336c adds invoice_recipient to AttendeeProfileBase 2016-04-07 17:17:15 +10:00
Christopher Neugebauer
38cdb8aa63 Makes invoice model, controller, and test changes to match issue #15 design doc 2016-04-07 17:16:56 +10:00
Christopher Neugebauer
5633554854 Tests now use TestingInvoiceController 2016-04-07 17:16:21 +10:00
Christopher Neugebauer
ac10ea4ee8 s/cart_controller_helper/controller_helpers/ 2016-04-07 17:16:04 +10:00
Christopher Neugebauer
8e95bb7469 flake8 fixes 2016-04-07 13:26:25 +10:00
Christopher Neugebauer
2f77f5bb23 Replaces .active = False; .save() pattern in tests with a test controller method 2016-04-06 17:24:25 +10:00
Christopher Neugebauer
8ad265a65a Fixes tests now that $0 invoices pay themselves 2016-04-06 17:19:09 +10:00
Christopher Neugebauer
c8c16072ba fix_simple_errors() now removes exhausted vouchers from the voucher set. 2016-04-06 14:02:23 +10:00
Christopher Neugebauer
0d57da8d6f Makes apply_voucher() idempotent, adds _test_voucher to validate_cart, and updates tests. 2016-04-06 14:02:22 +10:00
Christopher Neugebauer
8d07518a9b Fixes an incorrect voucher test 2016-04-06 14:02:22 +10:00
Christopher Neugebauer
7d97d2d2de Adds fix_simple_errors to cart - it zeroes out unavailable products. Adds test that it does that. 2016-04-06 14:02:22 +10:00
Christopher Neugebauer
f5d9458d1a Adds a validation based on available_products to validate_cart, and a test based on simple enabling conditions 2016-04-06 10:22:44 +10:00
Christopher Neugebauer
7609965883 flake8 compliance 2016-04-03 13:21:57 +10:00
Christopher Neugebauer
4d134e95d7 Refactors discount ceiling testing to make sure that the discount ceiling only considers items where the discount was applied in determining if the discount was reached. 2016-04-03 13:16:35 +10:00
Christopher Neugebauer
eab1deff77 Removes set_quantity and add_to_cart from CartController, and factors it into a test controller for testing 2016-04-03 10:07:59 +10:00
Christopher Neugebauer
2cbda9172f Fixes bug in product and category, and ceiling enabling conditions 2016-04-02 20:31:59 +11:00
Christopher Neugebauer
2e0144effe flake8 2016-04-02 13:29:53 +11:00
Christopher Neugebauer
8f233c7943 available_products now refers to the user’s product limits as well as enabling conditions 2016-04-02 13:14:34 +11:00