|
Lines 477-486
sub items {
Link Here
|
| 477 |
return Koha::Items->_new_from_dbic( $items_rs ) unless $params->{host_items}; |
477 |
return Koha::Items->_new_from_dbic( $items_rs ) unless $params->{host_items}; |
| 478 |
|
478 |
|
| 479 |
my $host_itemnumbers = $self->_host_itemnumbers(); |
479 |
my $host_itemnumbers = $self->_host_itemnumbers(); |
| 480 |
my $params = { -or => [biblionumber => $self->id] }; |
480 |
my $search_params = { -or => [biblionumber => $self->id] }; |
| 481 |
push @{$params->{'-or'}}, itemnumber => { -in => $host_itemnumbers } if $host_itemnumbers; |
481 |
push @{$search_params->{'-or'}}, itemnumber => { -in => $host_itemnumbers } if $host_itemnumbers; |
| 482 |
|
482 |
|
| 483 |
return Koha::Items->search($params); |
483 |
return Koha::Items->search($search_params); |
| 484 |
} |
484 |
} |
| 485 |
|
485 |
|
| 486 |
=head3 host_items |
486 |
=head3 host_items |
| 487 |
- |
|
|