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

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

Return to bug 30847