From 3dcdcf427477cd875bb40c1ab88746bb053b3c22 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 6 May 2013 11:01:52 -0400 Subject: [PATCH] LP 1169193 Support L/O xact close on paid Middle-layer support for the org unit setting "Leave transaction open when long overdue balance equals zero". It behaves the same as "Leave transaction open when lost balance equals zero", but for long-overdue circs. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson --- .../perlmods/lib/OpenILS/Application/Circ/CircCommon.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm index 03dc4d5fb5..2901ec5ae3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm @@ -235,7 +235,22 @@ sub can_close_circ { ) ); } + + } elsif ($reason eq OILS_STOP_FINES_LONGOVERDUE) { + # Check the copy circ_lib to see if they close + # transactions when long-overdue are paid. + my $copy = $e->retrieve_asset_copy($circ->target_copy); + if ($copy) { + $can_close = !$U->is_true( + $U->ou_ancestor_setting_value( + $copy->circ_lib, + 'circ.longoverdue.xact_open_on_zero', + $e + ) + ); + } } + return $can_close; } -- 2.11.0