truncate fines to max fine amount (LP#1145284) user/jeffdavis/lp1145284-truncate-to-max-fine
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 4 Mar 2013 21:42:08 +0000 (13:42 -0800)
committerJeff Davis <jdavis@sitka.bclibraries.ca>
Mon, 4 Mar 2013 21:42:55 +0000 (13:42 -0800)
commit5b07671a74d8b5eceb01157e3c8768c9e1c62250
tree82626393146069b368bed98dd1c5853af575ee07
parentc0489034bcafdd720e51ee828742a4607462fb06
truncate fines to max fine amount (LP#1145284)

When the max fine amount is not a multiple of the recurring fine amount,
fines will actually max out at an amount greater than the max fine
value.  This commit adds YAOUS and some simple functionality to
optionally truncate the final amount billed to the max fine amount.

For example, if max fine is $5.00 and recurring fine is $0.30, the 17th
billing will bring the total amount billed to $5.10 (17 x $0.30),
thereby exceeding the max fine amount.  With this commit, if
circ.fines.truncate_to_max_fine is true, the final billing amount will
be reduced and the total amount billed will be $5.00.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/sql/Pg/upgrade/XXXX.data.truncate-to-max-fine-setting.sql [new file with mode: 0644]