From: Ben Shum Date: Wed, 21 Jan 2015 21:30:53 +0000 (-0500) Subject: LP#1412893: Only apply lost and paid status with the proper transactions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=609db84f0499cf7083b09d1786ace1a60f71986e;p=contrib%2FConifer.git LP#1412893: Only apply lost and paid status with the proper transactions As discovered while testing the lost and paid feature, when closing earlier transactions where the item is currently lost, it could change the item status to lost and paid prematurely. Change the logic so that it only does this if the current transaction being closed either has a status of lost or longoverdue. Signed-off-by: Ben Shum Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index 040187630f..6c59ad1d30 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -497,7 +497,7 @@ sub make_payments { # check org_unit_settings for the copy owning library # and adjust and possibly adjust copy status to lost # and paid. - if ($circ) { + if ($circ && ($circ->stop_fines eq 'LOST' || $circ->stop_fines eq 'LONGOVERDUE')) { # We need the copy to check settings and to possibly # change its status. my $copy = $circ->target_copy();