View | Details | Raw Unified | Return to bug 33497
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-4 / +3 lines)
Lines 449-459 sub items { Link Here
449
449
450
    return Koha::Items->_new_from_dbic( $items_rs ) unless $params->{host_items};
450
    return Koha::Items->_new_from_dbic( $items_rs ) unless $params->{host_items};
451
451
452
    my @itemnumbers = $items_rs->get_column('itemnumber')->all;
452
    my $host_itemnumbers = $self->_host_itemnumbers();
453
    my $host_itemnumbers = $self->_host_itemnumbers();
453
    my $params = { -or => [biblionumber => $self->id] };
454
    push @itemnumbers, @{ $host_itemnumbers };
454
    push @{$params->{'-or'}}, itemnumber => { -in => $host_itemnumbers } if $host_itemnumbers;
455
    return Koha::Items->search({ "me.itemnumber" => { -in => \@itemnumbers } });
455
456
    return Koha::Items->search($params);
457
}
456
}
458
457
459
=head3 host_items
458
=head3 host_items
(-)a/catalogue/detail.pl (-2 / +1 lines)
Lines 193-199 my $itemtypes = { map { $_->itemtype => $_ } @{ Koha::ItemTypes->search_with_loc Link Here
193
my $params;
193
my $params;
194
my $patron = Koha::Patrons->find( $borrowernumber );
194
my $patron = Koha::Patrons->find( $borrowernumber );
195
$params->{ itemlost } = 0 if $patron->category->hidelostitems && !$showallitems;
195
$params->{ itemlost } = 0 if $patron->category->hidelostitems && !$showallitems;
196
my $items = $biblio->items({ host_items => 1 })->search_ordered( $params, { prefetch => ['issue','branchtransfers'] } );
196
my $items = $biblio->items({ host_items => 1 })->search_ordered( $params, { prefetch => ['issue','branchtransfer'] } );
197
197
198
# flag indicating existence of at least one item linked via a host record
198
# flag indicating existence of at least one item linked via a host record
199
my $hostrecords = $biblio->host_items->count;
199
my $hostrecords = $biblio->host_items->count;
200
- 

Return to bug 33497