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

(-)a/C4/Circulation.pm (-2 / +6 lines)
Lines 2015-2024 sub AddReturn { Link Here
2015
    }
2015
    }
2016
2016
2017
    # find reserves.....
2017
    # find reserves.....
2018
    # if we don't have a reserve with the status W, we launch the Checkreserves routine
2018
    # launch the Checkreserves routine to find any holds
2019
    my ($resfound, $resrec);
2019
    my ($resfound, $resrec);
2020
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2020
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2021
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2021
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2022
    # if a hold is found and is waiting at another branch, change the priority back to 1 and trigger the hold (this will trigger a transfer and update the hold status properly)
2023
    if ( $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) {
2024
        ModReserve( { rank => 1, reserve_id => $resrec->{reserve_id}, branchcode => $resrec->{branchcode} } );
2025
        ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2026
    }
2022
    if ($resfound) {
2027
    if ($resfound) {
2023
          $resrec->{'ResFound'} = $resfound;
2028
          $resrec->{'ResFound'} = $resfound;
2024
        $messages->{'ResFound'} = $resrec;
2029
        $messages->{'ResFound'} = $resrec;
2025
- 

Return to bug 21346