[open-ils-commits] r18688 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Nov 10 16:29:56 EST 2010
Author: senator
Date: 2010-11-10 16:29:51 -0500 (Wed, 10 Nov 2010)
New Revision: 18688
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
Booking: fix bug reported by Robert Soulliere wherein the items associated
with picked-up reservations didn't actually get their status set to 'checked
out' like they should have.
Robert reported this bug on Launchpad (#672748) and provided a patch, but
there were some neighboring bugs in the circulation logic anyway, so they've
all been fixed together.
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-11-10 20:51:23 UTC (rev 18687)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-11-10 21:29:51 UTC (rev 18688)
@@ -1880,10 +1880,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;
@@ -1897,7 +1898,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});
@@ -1909,9 +1910,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