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

(-)a/C4/Circulation.pm (-2 / +8 lines)
Lines 2027-2036 sub AddReturn { Link Here
2027
    }
2027
    }
2028
2028
2029
    # find reserves.....
2029
    # find reserves.....
2030
    # if we don't have a reserve with the status W, we launch the Checkreserves routine
2030
    # launch the Checkreserves routine to find any holds
2031
    my ($resfound, $resrec);
2031
    my ($resfound, $resrec);
2032
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2032
    my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds
2033
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2033
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2034
    # 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)
2035
    if ( $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) {
2036
        C4::Reserves::RevertWaitingStatus( { itemnumber => $itemnumber } );
2037
        #If the hold is reverted we need to refetch for the return values
2038
        ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2039
    }
2040
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} );
2034
    if ($resfound) {
2041
    if ($resfound) {
2035
          $resrec->{'ResFound'} = $resfound;
2042
          $resrec->{'ResFound'} = $resfound;
2036
        $messages->{'ResFound'} = $resrec;
2043
        $messages->{'ResFound'} = $resrec;
2037
- 

Return to bug 21944