after a renewal, return the billing summary for the checked-in circ. removed unused...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Oct 2009 13:49:11 +0000 (13:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 19 Oct 2009 13:49:11 +0000 (13:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14487 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 34b8071..5c23a92 100644 (file)
@@ -387,7 +387,6 @@ my @AUTOLOAD_FIELDS = qw/
     transit
     checkin_changed
     force
-    old_circ
     permit_override
     pending_checkouts
     cancelled_hold_transit
@@ -1229,15 +1228,26 @@ sub do_checkout {
     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
             }
         )
     );