Closed ssinger closed 1 day ago
I like the principle f this, but a couple of notes.
This looks a lot better, I think.
Reading it again and thinking some more, I thought of one more thing. Should we not just get rid of the "5 days" rule as well, and instead just default the due-by date to 5 days before the conference? ISTM if we're making it flexible we should turn as much hard-coding into default-but-changeable instead. In doing this we could say that the due date is mandatory, and just default it to 5 days before, which I think would make the process clearer?
Also, should we not make paymentdueby be a DateField
rather than a DateTimeField
and set the time to midnight? I think most people are used to dealing with invoice due dates rather than times. In fact we already present it as a date rather than time in at least some views. This would also make it match up cleaner with the start date of a conference which is defined as a date rather than a time.
I've updated paymentdueby to be just a date and be mandatory
I took the liberty to change paymentterms
to paymentdays
in the model -- you immediately turned it into a variable named that, and the documentation also named it that, so it seemed simpler.
I also fixed a couple of typos, and updated the documentation for th elatest changes you made (making it mandatory).
I changed the at least to me strange combination of "nulls not allowed but blanks allowed" for a date field (what's a blank date?), and set not null on the int field since it's supposed to be mandatory (and was when edited through django, but we want the not null constraint).
Added an actual default for the paymentdueby field - you only had it setting the default in the migration, not when actually creating a new level.
Oh, and I rebased it on master. Now let's see if I can figure out how to actually update the PR...
Allow the payment terms(days until payment to be paid) set to values other than 30. Also allow a deadline to be set where payment is due at the deadline(or on the invoice date) after this time.