LP#1443952 Lost fine handling refactor
authorDan Wells <dbw2@calvin.edu>
Fri, 20 Feb 2015 22:36:25 +0000 (17:36 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 14 Apr 2015 20:29:40 +0000 (16:29 -0400)
commit20f6442dea10e0df0ce4c5bd67f1fe0128176da2
treebb130fcbf846cb1ffa3fec8d357af529a80d27c7
parent42e536475e4c086d6a39722ffb1f7c3c62185f3e
LP#1443952 Lost fine handling refactor

This commit moves the lost fine logic out of the lost processing
portion of Circulate.pm and into the new handle_fines() method.
This is accomplished through setting a new flag and lost
options hash on the main Circulator object.

This change improves the overall process flow, and in doing so
addresses a bug where overdue fines could be doubled if both
restore-overdue-on-lost-return and generate-new-overdues-on-lost-return
are enabled.  Before this change, the new fines would generate before
the old fines were unvoided, which effectively circumvented the max
fines setting.

A secondary change made here is that stop_fines is also now being set
during the handle_fines() stage. This improves any case where overdues
are being set on checkin, particularly lost returns, as the stop_fines
will end up as the proper value of MAX_FINES or CHECKIN.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm