Handle shipped copies that are not found

Handle shipped copies that are not found by barcode.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Move invalid copy detection up

Move invalid copy detection up

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Robustify update_pickup_lib sub

Robustify update_pickup_lib sub to handle cases where the bib or
hold is not found.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Move "find hold on copy" logic into own sub

Move the "find hold on copy" logic in update_hold_pickup into its
own new subroutine, find_hold_on_copy.

This is to prepare for where we will need to find the hold again in
accept_item.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Make holds go Available at AcceptItem time

So that we may benefit from things like patron notification, make
the hold for an item go Available at AcceptItem time by checking the
copy in at the pickup location.

Since the AcceptItem message does not contain location information,
fetch the pickup information from the hold.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add check for hold in AcceptItem

Add a check in AcceptItem message handling to ensure that a hold was
found before trying to check the item in to capture for that hold.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Add further hold-not-found checks

Add checks for hold-not-found in update_hold_pickup subroutine to
prevent failure from trying to call pickup_lib on an undef value.

Signed-off-by: Jeff Godin <jgodin@tadl.org>