@@ -, +, @@ holds 1. Apply patch 2. Have a biblio record with one item A 3. Make a hold on item A for patron Y (bib level or item, doesn't matter) 4. Check in item A in intranet so that it goes to Waiting status 5. Try to checkout item A for patron X with the SIP server 6. Checkout should fail with message "Item is on hold shelf for another patron." 1. Apply patch 2. Have a biblio record with two items A and B 3. Make a hold on item A for patron Y (bib level or item, doesn't matter) 4. Check in item A in intranet so that it goes to Waiting status 5. Try to checkout item B for patron X with the SIP server 6. Checkout should succeed 1. Apply patch 2. Make sure AllowItemsOnHoldCheckout is set "Don't allow" 3. Have a biblio record with one item A 4. Make a hold on item A for patron Y (bib level or item, doesn't matter) 5. Try to checkout item A for patron X with the SIP server 6. Checkout should fail with message "Item is reserved for another patron upon return." --- C4/SIP/ILS/Transaction/Checkout.pm | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) --- a/C4/SIP/ILS/Transaction/Checkout.pm +++ a/C4/SIP/ILS/Transaction/Checkout.pm @@ -71,14 +71,14 @@ sub do_checkout { foreach my $confirmation (keys %{$needsconfirmation}) { if ($confirmation eq 'RENEW_ISSUE'){ $self->screen_msg("Item already checked out to you: renewing item."); - } elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') { - my $x = $self->{item}->available($patron_barcode); - if ($x) { - $self->screen_msg("Item was reserved for you."); - } else { - $self->screen_msg("Item is reserved for another patron upon return."); - $noerror = 0; - } + } elsif ($confirmation eq 'RESERVED') { + $self->screen_msg("Item is reserved for another patron upon return."); + $noerror = 0; + last; + } elsif ($confirmation eq 'RESERVE_WAITING') { + $self->screen_msg("Item is on hold shelf for another patron."); + $noerror = 0; + last; } elsif ($confirmation eq 'ISSUED_TO_ANOTHER') { $self->screen_msg("Item already checked out to another patron. Please return item for check-in."); $noerror = 0; @@ -105,15 +105,6 @@ sub do_checkout { } } my $itemnumber = $self->{item}->{itemnumber}; - foreach (@$shelf) { - $debug and warn "shelf has ($_->{itemnumber} for $_->{borrowernumber}). this is ($itemnumber, $self->{patron}->{borrowernumber})"; - ($_->{itemnumber} eq $itemnumber) or next; # skip it if not this item - ($_->{borrowernumber} == $self->{patron}->{borrowernumber}) and last; - # if item was waiting for this patron, we're done. AddIssue takes care of the "W" hold. - $debug and warn "Item is on hold shelf for another patron."; - $self->screen_msg("Item is on hold shelf for another patron."); - $noerror = 0; - } my ($fee, undef) = GetIssuingCharges($itemnumber, $self->{patron}->{borrowernumber}); if ( $fee > 0 ) { $self->{sip_fee_type} = '06'; --