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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Oct 19 09:49:13 EDT 2009


Author: erickson
Date: 2009-10-19 09:49:11 -0400 (Mon, 19 Oct 2009)
New Revision: 14487

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
after a renewal, return the billing summary for the checked-in circ.  removed unused autoload field

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-10-19 13:18:57 UTC (rev 14486)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-10-19 13:49:11 UTC (rev 14487)
@@ -387,7 +387,6 @@
     transit
     checkin_changed
     force
-    old_circ
     permit_override
     pending_checkouts
     cancelled_hold_transit
@@ -1229,15 +1228,26 @@
     OpenILS::Utils::Penalty->calculate_penalties($self->editor, $self->patron->id, $self->circ_lib);
 
     my $record = $U->record_to_mvr($self->title) unless $self->is_precat;
+    
+    my $pcirc;
+    if($self->is_renewal) {
+        # flesh the billing summary for the checked-in circ
+        $pcirc = $self->editor->retrieve_action_circulation([
+            $self->parent_circ,
+            {flesh => 2, flesh_fields => {circ => ['billable_transaction'], mbt => ['summary']}}
+        ]);
+    }
+
     $self->push_events(
         OpenILS::Event->new('SUCCESS',
             payload  => {
-                copy              => $U->unflesh_copy($self->copy),
-                circ              => $self->circ,
-                record            => $record,
-                holds_fulfilled   => $self->fulfilled_holds,
-                deposit_billing      => $self->deposit_billing,
-                rental_billing       => $self->rental_billing
+                copy             => $U->unflesh_copy($self->copy),
+                circ             => $self->circ,
+                record           => $record,
+                holds_fulfilled  => $self->fulfilled_holds,
+                deposit_billing  => $self->deposit_billing,
+                rental_billing   => $self->rental_billing,
+                parent_circ      => $pcirc
             }
         )
     );



More information about the open-ils-commits mailing list