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

(-)a/Koha/Holds.pm (-2 / +3 lines)
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
        }
(-)a/circ/pendingreserves.pl (-3 / +2 lines)
Lines 156-162 unless ( $enddate ) { Link Here
156
# building query parameters
156
# building query parameters
157
my %where = (
157
my %where = (
158
    'reserve.found' => undef,
158
    'reserve.found' => undef,
159
    'reserve.priority' => 1,
160
    'reserve.suspend' => 0,
159
    'reserve.suspend' => 0,
161
    'itembib.itemlost' => 0,
160
    'itembib.itemlost' => 0,
162
    'itembib.withdrawn' => 0,
161
    'itembib.withdrawn' => 0,
Lines 188-195 if ( C4::Context->preference('IndependentBranches') ){ Link Here
188
# get all distinct unfulfilled reserves
187
# get all distinct unfulfilled reserves
189
my $holds = Koha::Holds->search(
188
my $holds = Koha::Holds->search(
190
    { %where },
189
    { %where },
191
    { join => 'itembib', alias => 'reserve', distinct  => 1, columns => qw[me.biblionumber] }
190
    { join => 'itembib', alias => 'reserve', distinct => 1, columns => [qw/ reserve.biblionumber reserve.itemnumber /] }
192
);
191
);
192
193
my @biblionumbers = $holds->get_column('biblionumber');
193
my @biblionumbers = $holds->get_column('biblionumber');
194
194
195
my $all_items;
195
my $all_items;
196
- 

Return to bug 29161