add documentation & return active date to y-m-d user/lew/thaw_on_open
authorLlewellyn Marshall <llewellyn.marshall@ncdcr.gov>
Thu, 25 Aug 2022 21:16:34 +0000 (17:16 -0400)
committerLlewellyn Marshall <llewellyn.marshall@ncdcr.gov>
Thu, 25 Aug 2022 21:16:34 +0000 (17:16 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index 9396ed9..352497f 100644 (file)
@@ -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");