|
Lines 2048-2057
sub AddReturn {
Link Here
|
| 2048 |
my ($resfound, $resrec); |
2048 |
my ($resfound, $resrec); |
| 2049 |
|
2049 |
|
| 2050 |
# find recalls..... |
2050 |
# find recalls..... |
| 2051 |
my $recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, old => undef }); |
2051 |
my $recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, status => 'R' }); |
|
|
2052 |
my $waiting_recall = Koha::Recalls->find({ itemnumber => $item->{'itemnumber'}, status => 'W' }); |
| 2052 |
if (defined $recall){ |
2053 |
if (defined $recall){ |
| 2053 |
$messages->{'RecallFound'} = 1; |
2054 |
$messages->{'RecallFound'} = 1; |
| 2054 |
$messages->{'Recall'} = $recall; |
2055 |
$messages->{'Recall'} = $recall; |
|
|
2056 |
} elsif (defined $waiting_recall){ |
| 2057 |
$messages->{'RecallFound'} = 1; |
| 2058 |
$messages->{'Recall'} = $waiting_recall; |
| 2055 |
} else { |
2059 |
} else { |
| 2056 |
# find reserves..... |
2060 |
# find reserves..... |
| 2057 |
# if we don't have a reserve with the status W, we launch the Checkreserves routine |
2061 |
# if we don't have a reserve with the status W, we launch the Checkreserves routine |
|
Lines 2060-2066
sub AddReturn {
Link Here
|
| 2060 |
if ($resfound) { |
2064 |
if ($resfound) { |
| 2061 |
$resrec->{'ResFound'} = $resfound; |
2065 |
$resrec->{'ResFound'} = $resfound; |
| 2062 |
$messages->{'ResFound'} = $resrec; |
2066 |
$messages->{'ResFound'} = $resrec; |
| 2063 |
} |
|
|
| 2064 |
} |
2067 |
} |
| 2065 |
|
2068 |
|
| 2066 |
# Record the fact that this book was returned. |
2069 |
# Record the fact that this book was returned. |