Lines 111-117
Items that are not:
Link Here
|
111 |
sub get_items_that_can_fill { |
111 |
sub get_items_that_can_fill { |
112 |
my ( $self ) = @_; |
112 |
my ( $self ) = @_; |
113 |
|
113 |
|
114 |
my @biblionumbers = $self->get_column('biblionumber'); |
114 |
my @biblionumbers = $self->search({'reserve.itemnumber' => undef})->get_column('biblionumber'); |
|
|
115 |
my @itemnumbers = $self->search({ -not => { 'reserve.itemnumber' => undef } })->get_column('itemnumber'); |
115 |
|
116 |
|
116 |
my @branchtransfers = map { $_->itemnumber } |
117 |
my @branchtransfers = map { $_->itemnumber } |
117 |
Koha::Item::Transfers->search( |
118 |
Koha::Item::Transfers->search( |
Lines 132-138
sub get_items_that_can_fill {
Link Here
|
132 |
|
133 |
|
133 |
return Koha::Items->search( |
134 |
return Koha::Items->search( |
134 |
{ |
135 |
{ |
135 |
biblionumber => { in => \@biblionumbers }, |
136 |
-or => [ biblionumber => { in => \@biblionumbers }, 'me.itemnumber' => { in => \@itemnumbers } ], |
136 |
itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, |
137 |
itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, |
137 |
onloan => undef, |
138 |
onloan => undef, |
138 |
} |
139 |
} |