<event code='1714' textcode='HIGH_LEVEL_HOLD_HAS_NO_COPIES'>
<desc xml:lang="en-US">A hold request at a higher level than copy has been attempted, but there are no copies that belonging to the higher-level unit.</desc>
</event>
+ <event code='1715' textcode='HOLD_SUSPEND_AFTER_CAPTURE'>
+ <desc xml:lang="en-US">Attempt to suspend a hold after it has been captured.</desc>
+ </event>
<event code='2000' textcode='BAD_PARAMS'>
# --------------------------------------------------------------
- # See if the hold is getting frozen while in transit. If so,
- # make sure that's allowed.
+ # Disallow hold suspencion if the hold is already captured.
# --------------------------------------------------------------
- if ($U->is_true($hold->frozen) and !$U->is_true($orig_hold->frozen)) {
+ if ($U->is_true($hold->frozen) and not $U->is_true($orig_hold->frozen)) {
$hold_status = _hold_status($e, $hold);
- if ($hold_status == 3) { # in transit
-
- }
+ if ($hold_status > 2) { # hold is captured
+ $logger->info("bypassing hold freeze on captured hold");
+ return OpenILS::Event->new('HOLD_SUSPEND_AFTER_CAPTURE');
+ }
}