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

(-)a/catalogue/detail.pl (-3 / +5 lines)
Lines 193-205 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','current_branchtransfers'] } );
196
my $items_params = {
197
    ( $invalid_marc_record ? () : ( host_items => 1 ) ),
198
};
199
my $items = $biblio->items($items_params)->search_ordered( $params, { prefetch => ['issue','current_branchtransfers'] } );
197
200
198
# flag indicating existence of at least one item linked via a host record
201
# flag indicating existence of at least one item linked via a host record
199
my $hostrecords = $biblio->host_items->count;
202
my $hostrecords = $biblio->host_items->count;
200
203
201
my $dat = &GetBiblioData($biblionumber);
204
my $dat = &GetBiblioData($biblionumber);
202
$dat->{'count'} = $biblio->items({ host_items => 1 })->count;
205
$dat->{'count'} = $biblio->items($items_params)->count;
203
$dat->{'showncount'} = $items->count;
206
$dat->{'showncount'} = $items->count;
204
$dat->{'hiddencount'} = $dat->{'count'} - $dat->{'showncount'};
207
$dat->{'hiddencount'} = $dat->{'count'} - $dat->{'showncount'};
205
208
206
- 

Return to bug 33497