LP#1686194 Account for adjustments when generating fines user/dbwells/lp1686194_missing_adjustments_max_fines
authorDan Wells <dbw2@calvin.edu>
Mon, 24 Apr 2017 18:29:04 +0000 (14:29 -0400)
committerDan Wells <dbw2@calvin.edu>
Tue, 25 Apr 2017 20:23:56 +0000 (16:23 -0400)
commitf960b2e5840fad53fbffd380ded71b14e77e7c40
tree227c570e56776f71cab62765a429d99cac8ad3eb
parent4d636e544449f8e67fe38552d74e96b12aff6201
LP#1686194 Account for adjustments when generating fines

Fine generation stops at a predetermined 'max fines' amount, but this
does not account for possible adjustments which lower the effective
fine amount.  This situation is common in cases where lost items are
returned, and the library wants to generate additional overdues upon
that event.

With this commit, fine generation will pull in any adjustments applied
to overdue fines, and use those to offset the current total fine when
checking for max fines.

Also includes test for this condition.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm
Open-ILS/src/perlmods/live_t/09-lp1198465_neg_balances.t
Open-ILS/tests/datasets/sql/neg_bal_custom_transactions.sql