}
my $holds = $e->json_query({
- select => {ahr => ['pickup_lib', 'current_shelf_lib', 'behind_desk']},
+ select => {ahr => ['pickup_lib', 'current_shelf_lib']},
from => 'ahr',
where => {
usr => $user_id,
}
});
- my @ready = grep {
- $_->{current_shelf_lib} and # avoid undef warnings
- $_->{pickup_lib} eq $_->{current_shelf_lib}
- } @$holds;
-
return {
total => scalar(@$holds),
- ready => scalar(@ready),
- behind_desk => scalar(grep { $_->{behind_desk} eq 't' } @ready)
+ ready => scalar(
+ grep {
+ $_->{current_shelf_lib} and # avoid undef warnings
+ $_->{pickup_lib} eq $_->{current_shelf_lib}
+ } @$holds
+ )
};
}