Lines 2059-2068
sub AddReturn {
Link Here
|
2059 |
} |
2059 |
} |
2060 |
|
2060 |
|
2061 |
# find reserves..... |
2061 |
# find reserves..... |
2062 |
# if we don't have a reserve with the status W, we launch the Checkreserves routine |
2062 |
# launch the Checkreserves routine to find any holds |
2063 |
my ($resfound, $resrec); |
2063 |
my ($resfound, $resrec); |
2064 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2064 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2065 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2065 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
|
|
2066 |
# 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) |
2067 |
if ( $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) { |
2068 |
C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } ); |
2069 |
#If the hold is reverted we need to refetch for the return values |
2070 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2071 |
} |
2072 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2066 |
if ($resfound) { |
2073 |
if ($resfound) { |
2067 |
$resrec->{'ResFound'} = $resfound; |
2074 |
$resrec->{'ResFound'} = $resfound; |
2068 |
$messages->{'ResFound'} = $resrec; |
2075 |
$messages->{'ResFound'} = $resrec; |
2069 |
- |
|
|