From: Dan Wells Date: Wed, 31 Aug 2016 01:50:19 +0000 (-0400) Subject: LP#1618624 Fix thinko in adjust-to-zero X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5df06a15efdf0a48e3772a882b95a1e970d420a3;p=Evergreen.git LP#1618624 Fix thinko in adjust-to-zero It appears that this test was written for an 'unless' instead of an 'if'. 'if' seems just as natural here, so let's go that route. This should prevent us from closing circulations prematurely, and also close them when we need to. Signed-off-by: Dan Wells 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 666b402ad0..4b27e221f5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -1051,7 +1051,7 @@ sub adjust_bills_to_zero_manual { # now we see if we can close the transaction # same logic as make_payments(); my $circ = $e->retrieve_action_circulation($xact_id); - if ($circ and !$CC->can_close_circ($e, $circ)) { + if (!$circ or $CC->can_close_circ($e, $circ)) { # we don't check to see if the xact is already closed. since the # xact had a negative balance, it should not have been closed, so # assume 'now' is the correct close time regardless.