From a6db6c71d1acbc3bc4429092bd7e512e74ad58e4 Mon Sep 17 00:00:00 2001 From: Llewellyn Marshall Date: Thu, 25 Aug 2022 17:16:34 -0400 Subject: [PATCH] add documentation & return active date to y-m-d --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 9396ed9a6f..352497fbf0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1549,13 +1549,16 @@ sub load_place_hold { } } elsif ($cgi->param('hold_suspend') =~ /p/) { + # suspend hold for pickup library. + # if library is closed, suspend until + # the next day the library operates. eval { my $thaw_date_str = $U->simplereq( 'open-ils.actor', - 'open-ils.actor.org_unit.next_operating_hour', $cgi->param('pickup_lib') || $self->ctx->{search_ou}); - #my $thaw_dt = DateTime::Format::ISO8601->parse_datetime($thaw_date_str); - $ctx->{thaw_date} = $thaw_date_str; - $ctx->{frozen} = 1; + 'open-ils.actor.org_unit.next_operating_hour', $cgi->param('pickup_lib') || $self->ctx->{search_ou}); + my $thaw_dt = DateTime::Format::ISO8601->parse_datetime($thaw_date_str); + $ctx->{thaw_date} = $thaw_dt->ymd; + $ctx->{frozen} = 1; }; if ($@) { $logger->warn("ignoring next_open_time when placing hold request"); -- 2.11.0