order bookings by start time
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Dec 2009 17:30:05 +0000 (17:30 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 8 Dec 2009 17:30:05 +0000 (17:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15103 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 5b43117..b81e4ca 100644 (file)
@@ -12,6 +12,8 @@ use OpenILS::Application::AppUtils;
 my $U = "OpenILS::Application::AppUtils";
 
 use OpenSRF::Utils::Logger qw/$logger/;
+use DateTime;
+use DateTime::Format::ISO8601;
 
 sub prepare_new_brt {
     my ($record_id, $owning_lib, $mvr) = @_;
@@ -295,6 +297,7 @@ sub reservation_list_by_filters {
         'select'   => { bresv => [ 'id' ] },
         'from'     => { bresv => {} },
         'where'    => {},
+        'order_by' => [{ class => bresv => field => start_time => direction => 'asc' }]
         'distinct' => 1
     };