On paycollect.pl we call 'moneyFormat' on the 'paid' and 'collected' amounts - this changes fractions of a cent to 0, however, we allow for submission of the 0 When paying 0 we redirect to the page, but lose some inputs so writing off selected, attempting to pay less than a cent, we get redirected to 'Pay fines' We should check the form before submission and prevent submission of 0
Created attachment 97815 [details] [review] Bug 24489: Don't allow payment of 0 To test: 1 - Put a fine on a patron 2 - Go to Accounting->Make a payment on the patrons record 3 - Select the fine and click 'Write off selected' 4 - Enter '.0001' into Writeoff amount and hit confirm 5 - You are redirected to make a payment with no error and are no longer writing off selected 6 - Apply patch 7 - Attempt to pay less than a cent 8 - You are warned that you must pay more than 0
Created attachment 98492 [details] [review] Bug 24489: Don't allow payment of 0 To test: 1 - Put a fine on a patron 2 - Go to Accounting->Make a payment on the patrons record 3 - Select the fine and click 'Write off selected' 4 - Enter '.0001' into Writeoff amount and hit confirm 5 - You are redirected to make a payment with no error and are no longer writing off selected 6 - Apply patch 7 - Attempt to pay less than a cent 8 - You are warned that you must pay more than 0 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks for jumping on this Nick.. :) Signing off
This patch does highlight some issues - it is possible to create fines of partial cents. With this patch those fines cannot be written off, or at least the partial cents cannot.
(In reply to Nick Clemens from comment #4) > This patch does highlight some issues - it is possible to create fines of > partial cents. With this patch those fines cannot be written off, or at > least the partial cents cannot. Can you clarify how fines can end up as partial cents.. I've lost track of where/how this can happen :(