Lines 2073-2082
sub AddReturn {
Link Here
|
2073 |
} |
2073 |
} |
2074 |
|
2074 |
|
2075 |
# find reserves..... |
2075 |
# find reserves..... |
2076 |
# if we don't have a reserve with the status W, we launch the Checkreserves routine |
2076 |
# launch the Checkreserves routine to find any holds |
2077 |
my ($resfound, $resrec); |
2077 |
my ($resfound, $resrec); |
2078 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2078 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2079 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2079 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
|
|
2080 |
# 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) |
2081 |
if ( $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) { |
2082 |
C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } ); |
2083 |
#If the hold is reverted we need to refetch for the return values |
2084 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2085 |
} |
2086 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->itemnumber, undef, $lookahead ) unless ( $item->withdrawn ); |
2080 |
if ($resfound) { |
2087 |
if ($resfound) { |
2081 |
$resrec->{'ResFound'} = $resfound; |
2088 |
$resrec->{'ResFound'} = $resfound; |
2082 |
$messages->{'ResFound'} = $resrec; |
2089 |
$messages->{'ResFound'} = $resrec; |
2083 |
- |
|
|