From: Bill Erickson Date: Wed, 9 Nov 2011 20:54:21 +0000 (-0500) Subject: TPac; batch hold update detects suspension of captured hold X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=89628336fa54a6418d12f7732960a243abd3151f;p=evergreen%2Fpines.git TPac; batch hold update detects suspension of captured hold If the user attempts to suspend a captured hold via batch hold update, warn that user af the update the some holds may not have been suspended and why. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index f14a200b7f..92ab41e551 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -467,7 +467,10 @@ sub handle_hold_update { push(@$vlist, $vals); } - $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1); + my $resp = $circ->request('open-ils.circ.hold.update.batch.atomic', $e->authtoken, undef, $vlist)->gather(1); + $self->ctx->{hold_suspend_post_capture} = 1 if + grep {$U->event_equals($_, 'HOLD_SUSPEND_AFTER_CAPTURE')} @$resp; + } elsif ($action eq 'edit') { my @vals = map { diff --git a/Open-ILS/src/templates/opac/myopac/holds.tt2 b/Open-ILS/src/templates/opac/myopac/holds.tt2 index 279f53cbb1..56327eed63 100644 --- a/Open-ILS/src/templates/opac/myopac/holds.tt2 +++ b/Open-ILS/src/templates/opac/myopac/holds.tt2 @@ -61,6 +61,12 @@ alt="Holds Help" src="[% ctx.media_prefix %]/images/question-mark.png" /> + + [% IF ctx.hold_suspend_post_capture; + l('One or more holds could not be suspended because
the item is at (or en route to) the pickup library.'); + END; + %] + [% l("Show") %]     [% IF CGI.param("available") %]