LP#1198465 Put penalty generation in the same xact
authorDan Wells <dbw2@calvin.edu>
Tue, 17 Feb 2015 17:31:44 +0000 (12:31 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 17 Feb 2015 21:04:22 +0000 (16:04 -0500)
The penalties need to "see" any fines we may have just added, so they
need to happen in the same transaction.  Passing in the optional editor
makes this an easy fix.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm

index 9be2fd7..db82c49 100644 (file)
@@ -571,9 +571,9 @@ sub generate_fines {
 
 #            $self->method_lookup('open-ils.storage.transaction.commit')->run;
 
-            # Caluclate penalties inline
+            # Calculate penalties inline
             OpenILS::Utils::Penalty->calculate_penalties(
-                undef, $c->usr, $c->$circ_lib_method);
+                $e, $c->usr, $c->$circ_lib_method);
 
         };