LP#1413592: Don't void LOST fines/fees on zero-balance user/miker/lp-1413592-avoid-lost-void-on-zero-balance
authorMike Rylander <mrylander@gmail.com>
Wed, 28 Jan 2015 13:40:20 +0000 (08:40 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 28 Jan 2015 18:40:50 +0000 (13:40 -0500)
commitfd65464f8fbe8689021b846695403fe20b598342
tree63ad6aab5cdedae2fed3aa1d74ae7a3bc477adbb
parent609db84f0499cf7083b09d1786ace1a60f71986e
LP#1413592: Don't void LOST fines/fees on zero-balance

The situation that has been reported as the worst offender for creating
negative balances for folks that do not want that to happen goes like this:

1) Item is lost
2) Fees/fines charged
3) Said fees/fines are paid in full
4) Item is found and returned
4a) "Void fines and fees on lost item return" settings are enabled
4b) System dutifully voids the fines/fees

So we add an YAOUS to ensure that when a lost item is returned and the
balance of the transaction is exactly $0, the fines and fees are not voided
EVEN IF "void fines and fees on lost item return" settings are enabled.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXX.data.avoid_lost_void_on_zero_balance.sql [new file with mode: 0644]