Booking: make pick up interface show resources captured for reservation ...
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 1 Feb 2012 23:11:52 +0000 (18:11 -0500)
committerMike Rylander <mrylander@gmail.com>
Mon, 13 Feb 2012 18:32:39 +0000 (13:32 -0500)
... even beyond the first day of the reservation.  I can think of no
reason why this limitation existed in the first place.

Also, just replace naive_start_of_day() with "today"

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm

index 781bded..00bcab8 100644 (file)
@@ -627,7 +627,6 @@ NOTES
 
 
 sub naive_ts_string {strftime("%F %T", localtime($_[0] || time));}
-sub naive_start_of_day {strftime("%F", localtime($_[0] || time))." 00:00:00";}
 
 # Return a map of bresv or an ilsevent on failure.
 sub get_uncaptured_bresv_for_brsrc {
@@ -1217,7 +1216,7 @@ sub get_captured_reservations {
                     "usr" => $patron->id,
                     "capture_time" => {"!=" => undef},
                     "pickup_time" => undef,
-                    "start_time" => {">=" => naive_start_of_day()},
+                    "start_time" => {"!=" => undef},
                     "cancel_time" => undef
                 },
                 $bresv_flesh
@@ -1238,7 +1237,7 @@ sub get_captured_reservations {
             return $e->search_booking_reservation([
                 {
                     "usr" => $patron->id,
-                    "return_time" => {">=" => naive_start_of_day()},
+                    "return_time" => {">=" => "today"},
                     "cancel_time" => undef
                 },
                 $bresv_flesh