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

(-)a/C4/Circulation.pm (-4 / +3 lines)
Lines 2224-2232 sub AddReturn { Link Here
2224
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn );
2224
    ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn );
2225
    # 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)
2225
    # 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)
2226
    if ( $resfound and $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) {
2226
    if ( $resfound and $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) {
2227
        my $hold = C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } );
2227
        C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } );
2228
        $resfound = 'Reserved';
2228
        #If the hold is reverted we need to refetch for the return values
2229
        $resrec = $hold->unblessed;
2229
        ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn );
2230
    }
2230
    }
2231
    if ($resfound) {
2231
    if ($resfound) {
2232
          $resrec->{'ResFound'} = $resfound;
2232
          $resrec->{'ResFound'} = $resfound;
2233
- 

Return to bug 28259