Bug 30876: Use Koha::Biblio

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-06-01 13:59:09 +02:00 committed by Tomas Cohen Arazi
parent 8beb878e5b
commit b60d59eb89
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ if ( $op eq 'list' ) {
$seen_bib{$recall->biblio_id}++;
# get recall data about this biblio
my $biblio = Koha::Biblios->find($recall->biblio_id);
my @this_bib_recalls = Koha::Recalls->search({ biblio_id => $recall->biblio_id, status => [ 'requested','overdue','in_transit' ] }, { order_by => { -asc => 'created_date' } })->as_list;
my $recalls_count = scalar @this_bib_recalls;
my @unique_patrons = do { my %seen; grep { !$seen{$_->patron_id}++ } @this_bib_recalls };
@ -71,7 +72,7 @@ if ( $op eq 'list' ) {
my @locations;
my @libraries;
my @items = Koha::Items->search({ biblio_id => $recall->biblio_id })->as_list;
my @items = $biblio->items->as_list;
foreach my $item ( @items ) {
if ( $item->can_be_waiting_recall and !$item->checkout ) {
# if item can be pulled to fulfill recall, collect item data