Bug 33653: Use filter_by_active instead
This patch makes `filter_by_lates` use the `filter_by_active` method instead of an ad-hoc query filter. It has the advantage that it considers standing orders too. No behavior change, tests should still pass. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
64c4f115cd
commit
7323a56823
|
|
@ -130,10 +130,7 @@ sub filter_by_lates {
|
|||
&& !C4::Context->IsSuperLibrarian
|
||||
? ( 'borrower.branchcode' => C4::Context->userenv->{branch} )
|
||||
: ()
|
||||
),
|
||||
|
||||
( orderstatus => { '-not_in' => ['cancelled', 'complete'] } ),
|
||||
|
||||
)
|
||||
},
|
||||
{
|
||||
'+select' => [
|
||||
|
|
@ -145,7 +142,7 @@ sub filter_by_lates {
|
|||
join => { 'basketno' => 'booksellerid' },
|
||||
prefetch => {'basketno' => 'booksellerid'},
|
||||
}
|
||||
);
|
||||
)->filter_by_active;
|
||||
}
|
||||
|
||||
=head3 filter_by_active
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ use C4::Output qw( output_html_with_http_headers );
|
|||
use C4::Context;
|
||||
use C4::Letters qw( SendAlerts GetLetters );
|
||||
use Koha::DateUtils qw( dt_from_string );
|
||||
use Koha::Acquisition::Orders qw( filter_by_lates );
|
||||
use Koha::Acquisition::Orders;
|
||||
use Koha::CsvProfiles;
|
||||
|
||||
my $input = CGI->new;
|
||||
|
|
|
|||
Loading…
Reference in New Issue