@@ -, +, @@ usable in command line scripts --- Koha/Acquisition/Orders.pm | 1 + 1 file changed, 1 insertion(+) --- a/Koha/Acquisition/Orders.pm +++ a/Koha/Acquisition/Orders.pm @@ -113,6 +113,7 @@ sub filter_by_lates { ( @delivery_time_conditions ? ( -and => \@delivery_time_conditions ) : ()), ( C4::Context->preference('IndependentBranches') + && defined(C4::Context->userenv) && !C4::Context->IsSuperLibrarian ? ( 'borrower.branchcode' => C4::Context->userenv->{branch} ) : () --