Bug 32883: Correct cubside pickups ordering

They are displayed by date of creation, it's not what we want for "to be
staged" for instance, where it needs to be ordered by date/time of
scheduled pickup.

Test plan:
Create several curbside pickups, to have some in the different tabs
Confirm that the order is the one you expect.
=> to be staged ordered by pickup date/time
=> stage and ready ordered by pickup date/time
=> patron is outside ordered by arrival date/time
=> delivered today ordered by *desc* delivered date/time

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-02-06 16:48:54 +01:00 committed by Tomas Cohen Arazi
parent 0970eef56d
commit 4943f06071
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -159,7 +159,8 @@ $template->param(
curbside_pickups => Koha::CurbsidePickups->search(
{
branchcode => $branchcode,
}
},
{ order_by => [ { -desc => 'delivered_datetime' }, 'arrival_datetime', 'scheduled_pickup_datetime' ], }
)->filter_by_scheduled_today,
);