during renewal, capture link to parent_circ for building the 'renewal chain'
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Sep 2009 19:45:56 +0000 (19:45 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 30 Sep 2009 19:45:56 +0000 (19:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14232 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 37123f5..bd9ef48 100644 (file)
@@ -406,6 +406,7 @@ my @AUTOLOAD_FIELDS = qw/
     capture
     noop
     void_overdues
+    parent_circ
 /;
 
 
@@ -1539,6 +1540,9 @@ sub build_checkout_circ_object {
    $circ->workstation($self->editor->requestor->wsid) 
     if defined $self->editor->requestor->wsid;
 
+    # renewals maintain a link to the parent circulation
+    $circ->parent_circ($self->parent_circ);
+
    if( $self->is_renewal ) {
       $circ->opac_renewal('t') if $self->opac_renewal;
       $circ->phone_renewal('t') if $self->phone_renewal;
@@ -2542,6 +2546,7 @@ sub do_renew {
 
     # -----------------------------------------------------------------
 
+    $self->parent_circ($circ->id);
     $self->renewal_remaining( $circ->renewal_remaining - 1 );
     $self->circ($circ);