From: erickson Date: Wed, 20 Jan 2010 15:27:33 +0000 (+0000) Subject: update circ xact_finish value after all billing for the transactions have been assess... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6b2c38d409c366ac7a3861eadc39168e36ce4594;p=evergreen%2Fpines.git update circ xact_finish value after all billing for the transactions have been assessed. In particular, after lost item handling. Thanks to Dan Wells for identifying the bug git-svn-id: svn://svn.open-ils.org/ILS/trunk@15344 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index d910c8bbef..06ae0614f6 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -2651,12 +2651,6 @@ sub checkin_handle_circ { $circ->stop_fines_time($self->backdate) if $self->backdate; } - # 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"); - # Set the checkin vars since we have the item $circ->checkin_time( ($self->backdate) ? $self->backdate : 'now' ); @@ -2695,6 +2689,13 @@ sub checkin_handle_circ { $self->update_copy; } + + # 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"); + return $self->bail_on_events($self->editor->event) unless $self->editor->update_action_circulation($circ);