update circ xact_finish value after all billing for the transactions have been assess...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jan 2010 15:27:33 +0000 (15:27 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jan 2010 15:27:33 +0000 (15:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15344 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm

index d910c8b..06ae061 100644 (file)
@@ -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);