|
Lines 450-459
sub items {
Link Here
|
| 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 $host_itemnumbers = $self->_host_itemnumbers(); |
452 |
my $host_itemnumbers = $self->_host_itemnumbers(); |
| 453 |
my $params = { -or => [biblionumber => $self->id] }; |
453 |
my $search_params = { -or => [biblionumber => $self->id] }; |
| 454 |
push @{$params->{'-or'}}, itemnumber => { -in => $host_itemnumbers } if $host_itemnumbers; |
454 |
push @{$search_params->{'-or'}}, itemnumber => { -in => $host_itemnumbers } if $host_itemnumbers; |
| 455 |
|
455 |
|
| 456 |
return Koha::Items->search($params); |
456 |
return Koha::Items->search($search_params); |
| 457 |
} |
457 |
} |
| 458 |
|
458 |
|
| 459 |
=head3 host_items |
459 |
=head3 host_items |
| 460 |
- |
|
|