Lines 2042-2056
sub AddReturn {
Link Here
|
2042 |
} |
2042 |
} |
2043 |
|
2043 |
|
2044 |
# find reserves..... |
2044 |
# find reserves..... |
2045 |
# if we don't have a reserve with the status W, we launch the Checkreserves routine |
|
|
2046 |
my ($resfound, $resrec); |
2045 |
my ($resfound, $resrec); |
2047 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2046 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2048 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} ); |
2047 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'}, undef, $lookahead ) unless ( $item->{'withdrawn'} ); |
2049 |
if ($resfound) { |
2048 |
if ($resfound eq 'Waiting' and $resrec->{branchcode} ne $branch){ #If we have a waiting reserve returned at another branch it no longer waiting |
|
|
2049 |
$messages->{'WrongTransfer'} = $resrec->{branchcode}; |
2050 |
$messages->{'WrongTransferItem'} = $resrec->{'itemnumber'}; |
2051 |
C4::Reserves::RevertWaitingStatus({itemnumber=>$resrec->{itemnumber}}); |
2052 |
$validTransfert = 1; |
2053 |
$messages->{'ResFound'} = $resrec; |
2054 |
} |
2055 |
elsif ($resfound) { |
2050 |
$resrec->{'ResFound'} = $resfound; |
2056 |
$resrec->{'ResFound'} = $resfound; |
2051 |
$messages->{'ResFound'} = $resrec; |
2057 |
$messages->{'ResFound'} = $resrec; |
2052 |
} |
2058 |
} |
2053 |
|
2059 |
|
|
|
2060 |
|
2054 |
# Record the fact that this book was returned. |
2061 |
# Record the fact that this book was returned. |
2055 |
UpdateStats({ |
2062 |
UpdateStats({ |
2056 |
branch => $branch, |
2063 |
branch => $branch, |
2057 |
- |
|
|