[open-ils-commits] r15344 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jan 20 10:27:36 EST 2010


Author: erickson
Date: 2010-01-20 10:27:33 -0500 (Wed, 20 Jan 2010)
New Revision: 15344

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
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

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-01-19 22:06:26 UTC (rev 15343)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-01-20 15:27:33 UTC (rev 15344)
@@ -2651,12 +2651,6 @@
       $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 @@
         $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);
 



More information about the open-ils-commits mailing list