From 3fcb9891d69e3eea34c01a80b694b8fdd2a908a5 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 19 Oct 2009 13:49:11 +0000 Subject: [PATCH] after a renewal, return the billing summary for the checked-in circ. removed unused autoload field git-svn-id: svn://svn.open-ils.org/ILS/trunk@14487 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Circ/Circulate.pm | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 34b8071667..5c23a92fe2 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -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 } ) ); -- 2.43.2