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

(-)a/C4/Reserves.pm (+10 lines)
Lines 171-176 sub AddReserve { Link Here
171
171
172
    $expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' });
172
    $expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' });
173
173
174
    # if we have an item selectionned, and the pickup branch is the same as the holdingbranch
175
    # of the document, we force the value $priority and $found .
176
    if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) {
177
        $priority = 0;
178
        my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls
179
        if ( $item->holdingbranch eq $branch ) {
180
            $found = 'W';
181
        }
182
    }
183
174
    if ( C4::Context->preference('AllowHoldDateInFuture') ) {
184
    if ( C4::Context->preference('AllowHoldDateInFuture') ) {
175
185
176
        # Make room in reserves for this before those of a later reserve date
186
        # Make room in reserves for this before those of a later reserve date
(-)a/opac/opac-reserve.pl (-6 lines)
Lines 272-283 if ( $query->param('place_reserve') ) { Link Here
272
        my $rank = $biblioData->{rank};
272
        my $rank = $biblioData->{rank};
273
        if ( $itemNum ne '' ) {
273
        if ( $itemNum ne '' ) {
274
            $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum ) eq 'OK';
274
            $canreserve = 1 if CanItemBeReserved( $borrowernumber, $itemNum ) eq 'OK';
275
            $rank = '0' unless C4::Context->preference('ReservesNeedReturns');
276
            my $item = GetItem($itemNum);
277
            if ( $item->{'holdingbranch'} eq $branch ) {
278
                $found = 'W'
279
                  unless C4::Context->preference('ReservesNeedReturns');
280
            }
281
        }
275
        }
282
        else {
276
        else {
283
            $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK';
277
            $canreserve = 1 if CanBookBeReserved( $borrowernumber, $biblioNum ) eq 'OK';
(-)a/reserve/placerequest.pl (-13 lines)
Lines 70-87 foreach my $bibnum (@biblionumbers) { Link Here
70
70
71
my $found;
71
my $found;
72
72
73
# if we have an item selectionned, and the pickup branch is the same as the holdingbranch
74
# of the document, we force the value $rank and $found .
75
if (defined $checkitem && $checkitem ne ''){
76
    $holds_to_place_count = 1;
77
    $rank[0] = '0' unless C4::Context->preference('ReservesNeedReturns');
78
    my $item = $checkitem;
79
    $item = GetItem($item);
80
    if ( $item->{'holdingbranch'} eq $branch ){
81
        $found = 'W' unless C4::Context->preference('ReservesNeedReturns');
82
    }
83
}
84
85
if ( $type eq 'str8' && $borrower ) {
73
if ( $type eq 'str8' && $borrower ) {
86
74
87
    foreach my $biblionumber ( keys %bibinfos ) {
75
    foreach my $biblionumber ( keys %bibinfos ) {
88
- 

Return to bug 20724