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 <jstephenson@mvlc.org>
# 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);