@@ -, +, @@ --- Koha/Acquisition/Orders.pm | 2 +- t/db_dependent/Koha/Acquisition/Order.t | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) --- a/Koha/Acquisition/Orders.pm +++ a/Koha/Acquisition/Orders.pm @@ -132,7 +132,7 @@ sub filter_by_lates { : () ), - ( orderstatus => { '!=' => 'cancelled' } ), + ( orderstatus => { '-not_in' => ['cancelled', 'complete'] } ), }, { --- a/t/db_dependent/Koha/Acquisition/Order.t +++ a/t/db_dependent/Koha/Acquisition/Order.t @@ -416,6 +416,7 @@ subtest 'filter_by_late' => sub { datereceived => undef, datecancellationprinted => undef, estimated_delivery_date => undef, + orderstatus => 'ordered', } } ); @@ -436,6 +437,7 @@ subtest 'filter_by_late' => sub { datereceived => undef, datecancellationprinted => undef, estimated_delivery_date => undef, + orderstatus => 'ordered', } } ); @@ -456,6 +458,7 @@ subtest 'filter_by_late' => sub { datereceived => undef, datecancellationprinted => undef, estimated_delivery_date => undef, + orderstatus => 'ordered', } } ); @@ -476,6 +479,19 @@ subtest 'filter_by_late' => sub { datereceived => undef, datecancellationprinted => undef, estimated_delivery_date => undef, + orderstatus => 'ordered', + } + } + ); + my $order_42 = $builder->build_object( + { + class => 'Koha::Acquisition::Orders', + value => { + basketno => $basket_4->basketno, + datereceived => undef, + datecancellationprinted => undef, + estimated_delivery_date => undef, + orderstatus => 'complete', } } ); --