bypass hold fulfillment attempt when checking out pre/non cat items
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Sep 2009 12:53:56 +0000 (12:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 2 Sep 2009 12:53:56 +0000 (12:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@13948 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 0883c4b..6bd3481 100644 (file)
@@ -1257,6 +1257,10 @@ sub bail_on_events {
     $self->bail_out(1);
 }
 
+
+# ------------------------------------------------------------------------------
+# When an item is checked out, see if we can fulfill a hold for this patron
+# ------------------------------------------------------------------------------
 sub handle_checkout_holds {
    my $self    = shift;
    my $copy    = $self->copy;
@@ -1265,6 +1269,9 @@ sub handle_checkout_holds {
    my $e = $self->editor;
    $self->fulfilled_holds([]);
 
+   # pre/non-cats can't fulfill a hold
+   return if $self->is_precat or $self->is_noncat;
+
     my $hold = $e->search_action_hold_request({   
         current_copy        => $copy->id , 
         cancel_time         => undef,