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

(-)a/circ/pendingreserves.pl (-4 / +3 lines)
Lines 156-162 unless ( $enddate ) { Link Here
156
# building query parameters
156
# building query parameters
157
my %where = (
157
my %where = (
158
    'me.found' => undef,
158
    'me.found' => undef,
159
    'me.priority' => 1,
159
    'me.priority' => { '!=' => 0 },
160
    'me.suspend' => 0,
160
    'me.suspend' => 0,
161
    'itembib.itemlost' => 0,
161
    'itembib.itemlost' => 0,
162
    'itembib.withdrawn' => 0,
162
    'itembib.withdrawn' => 0,
Lines 188-194 if ( C4::Context->preference('IndependentBranches') ){ Link Here
188
# get all distinct unfulfilled reserves
188
# get all distinct unfulfilled reserves
189
my $holds = Koha::Holds->search(
189
my $holds = Koha::Holds->search(
190
    { %where },
190
    { %where },
191
    { join => 'itembib', distinct  => 1, columns => qw[me.biblionumber] }
191
    { join => 'itembib', distinct => 1, columns => qw[me.biblionumber] }
192
);
192
);
193
my @biblionumbers = $holds->get_column('biblionumber');
193
my @biblionumbers = $holds->get_column('biblionumber');
194
194
Lines 202-208 if ( $holds->count ) { Link Here
202
# patrons count per biblio
202
# patrons count per biblio
203
my $patrons_count = {
203
my $patrons_count = {
204
    map { $_->{biblionumber} => $_->{patrons_count} } @{ Koha::Holds->search(
204
    map { $_->{biblionumber} => $_->{patrons_count} } @{ Koha::Holds->search(
205
            {},
205
            { 'suspend' => 0 },
206
            {
206
            {
207
                select   => [ 'biblionumber', { count => { distinct => 'borrowernumber' } } ],
207
                select   => [ 'biblionumber', { count => { distinct => 'borrowernumber' } } ],
208
                as       => [qw( biblionumber patrons_count )],
208
                as       => [qw( biblionumber patrons_count )],
209
- 

Return to bug 30337