From 2bb3267a42feea65d63e923f5beafb2edd047309 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 8 Dec 2006 18:36:06 +0000 Subject: [PATCH] properly setting opac/desk/phone renewal flag on circs created from renewals based on API flag provided by client git-svn-id: svn://svn.open-ils.org/ILS/trunk@6669 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/OpenILS/Application/Circ/Circulate.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 1836a8375a..72e87a1850 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -257,6 +257,7 @@ sub translate_legacy_args { $$args{is_precat} = $$args{precat}; delete $$args{precat}; } + } @@ -347,6 +348,9 @@ my @AUTOLOAD_FIELDS = qw/ permit_override pending_checkouts cancelled_hold_transit + opac_renewal + phone_renewal + desk_renewal /; @@ -396,6 +400,10 @@ sub new { $self->circ_lib( ($self->circ_lib) ? $self->circ_lib : $self->editor->requestor->ws_ou); + # if this is a renewal, default to desk_renewal + $self->desk_renewal(1) unless + $self->opac_renewal or $self->phone_renewal; + return $self; } @@ -1087,11 +1095,14 @@ sub build_checkout_circ_object { $circ->circ_lib( $self->circ_lib ); if( $self->is_renewal ) { - $circ->opac_renewal(1); + $circ->opac_renewal('t') if $self->opac_renewal; + $circ->phone_renewal('t') if $self->phone_renewal; + $circ->desk_renewal('t') if $self->desk_renewal; $circ->renewal_remaining($self->renewal_remaining); $circ->circ_staff($self->editor->requestor->id); } + # if the user provided an overiding checkout time, # (e.g. the checkout really happened several hours ago), then # we apply that here. Does this need a perm?? @@ -1728,7 +1739,6 @@ sub checkin_handle_circ { $self->update_copy; } - return $self->bail_on_events($self->editor->event) unless $self->editor->update_action_circulation($circ); } -- 2.43.2