Created attachment 3421 [details] [review] Proposed patch
Created attachment 3422 [details] [review] Proposed patch
Both patches need sign off
Created attachment 3653 [details] [review] patch signed-off
Created attachment 3654 [details] [review] signed-off squashed patch This patch squashed the 2 previous ones. It also adds a small fix on aqplan that prevented values to be saved. This problem had been introduced by owen's HTML reformatting (the authcat was not sent when the form was submitted)
Pushed, please test
Tested on current master. Calculation and saving seem to work fine even for odd numbers where the amount can not divided evenly.