[open-ils-commits] r18690 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Nov 10 16:31:33 EST 2010


Author: senator
Date: 2010-11-10 16:31:28 -0500 (Wed, 10 Nov 2010)
New Revision: 18690

Modified:
   branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
Backport r18688 from trunk: booking bugfix


Modified: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-11-10 21:30:37 UTC (rev 18689)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-11-10 21:31:28 UTC (rev 18690)
@@ -1714,10 +1714,11 @@
 
     if (
         $self->reservation->current_resource &&
-        $self->reservation->current_resource->catalog_item
+        $U->is_true($self->reservation->target_resource_type->catalog_item)
     ) {
-        $self->copy( $self->reservation->current_resource->catalog_item );
-        $self->patron( $self->reservation->usr );
+        # We used to try to set $self->copy and $self->patron here,
+        # but that should already be done.
+
         $self->run_checkout_scripts(1);
 
         my $duration   = $self->duration_rule;
@@ -1731,7 +1732,7 @@
             my $mname = $max->name;
             my $rname = $recurring->name;
 
-            $logger->debug("circulator: building reservation ".
+            $logger->debug("circulator: updating reservation ".
                 "with duration=$dname, maxfine=$mname, recurring=$rname");
 
             $self->reservation->fine_amount($policy->{recurring_fine});
@@ -1743,9 +1744,15 @@
         $self->update_copy();
 
     } else {
-        $self->reservation->fine_amount($self->reservation->fine_amount);
-        $self->reservation->max_fine($self->reservation->max_fine);
-        $self->reservation->fine_interval($self->reservation->fine_interval);
+        $self->reservation->fine_amount(
+            $self->reservation->target_resource_type->fine_amount
+        );
+        $self->reservation->max_fine(
+            $self->reservation->target_resource_type->max_fine
+        );
+        $self->reservation->fine_interval(
+            $self->reservation->target_resource_type->fine_interval
+        );
     }
 
     $self->update_reservation();



More information about the open-ils-commits mailing list