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

(-)a/opac/opac-reserve.pl (-13 / +3 lines)
Lines 170-187 foreach my $biblioNumber (@biblionumbers) { Link Here
170
170
171
    # Compute the priority rank.
171
    # Compute the priority rank.
172
    $biblioData->{object} = $biblio;
172
    $biblioData->{object} = $biblio;
173
    my $holds = $biblio->holds;
173
    my $reservecount = $biblio->holds->search({ found => [ {"!=" => "W"},undef] })->count;
174
    my $rank = $holds->count;
174
    $biblioData->{reservecount} = $reservecount;
175
    $biblioData->{reservecount} = 1;    # new reserve
175
    $biblioData->{rank} = $reservecount + 1;
176
    while ( my $hold = $holds->next ) {
177
        if ( $hold->is_waiting ) {
178
            $rank--;
179
        }
180
        else {
181
            $biblioData->{reservecount}++;
182
        }
183
    }
184
    $biblioData->{rank} = $rank + 1;
185
}
176
}
186
177
187
#
178
#
188
- 

Return to bug 30847