From 37fe3f2b686ee14130bf43ce4f1c00612d380820 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 30 Aug 2011 10:16:05 -0400 Subject: [PATCH] Potential fix for LP bug 667370, reported by Bill Ott. Adds an if block around the checking and logging of balance owed from mbts when renewing. If the mbts is not found the transaction is closed anyway and the fact that no mbts is found is logged. Signed-off-by: Jason Stephenson --- .../src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index 270f7aa654..de32c2f301 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -3238,9 +3238,13 @@ sub checkin_handle_circ { # see if there are any fines owed on this circ. if not, close it ($obt) = $U->fetch_mbts($circ->id, $self->editor); - $circ->xact_finish('now') if( $obt and $obt->balance_owed == 0 ); - - $logger->debug("circulator: ".$obt->balance_owed." is owed on this circulation"); + if ( $obt ) { + $circ->xact_finish('now') if( $obt->balance_owed == 0 ); + $logger->debug("circulator: ".$obt->balance_owed." is owed on this circulation"); + } else { + $circ->xact_finish('now'); + $logger->debug("circulator: no mbts on this circulation"); + } return $self->bail_on_events($self->editor->event) unless $self->editor->update_action_circulation($circ); -- 2.11.0