Lines 377-383
sub transferbook {
Link Here
|
377 |
# find reserves..... |
377 |
# find reserves..... |
378 |
# That'll save a database query. |
378 |
# That'll save a database query. |
379 |
my ( $resfound, $resrec, undef ) = |
379 |
my ( $resfound, $resrec, undef ) = |
380 |
CheckReserves( $item ); |
380 |
C4::Reserves::CheckReserves( $item ); |
381 |
if ( $resfound ) { |
381 |
if ( $resfound ) { |
382 |
$resrec->{'ResFound'} = $resfound; |
382 |
$resrec->{'ResFound'} = $resfound; |
383 |
$messages->{'ResFound'} = $resrec; |
383 |
$messages->{'ResFound'} = $resrec; |
Lines 1176-1182
sub CanBookBeIssued {
Link Here
|
1176 |
|
1176 |
|
1177 |
unless ( $ignore_reserves || $recall ) { |
1177 |
unless ( $ignore_reserves || $recall ) { |
1178 |
# See if the item is on reserve. |
1178 |
# See if the item is on reserve. |
1179 |
my ( $restype, $res ) = CheckReserves( $item_object ); |
1179 |
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item_object ); |
1180 |
if ($restype) { |
1180 |
if ($restype) { |
1181 |
my $resbor = $res->{'borrowernumber'}; |
1181 |
my $resbor = $res->{'borrowernumber'}; |
1182 |
if ( $resbor ne $patron->borrowernumber ) { |
1182 |
if ( $resbor ne $patron->borrowernumber ) { |
Lines 1436-1442
sub checkHighHolds {
Link Here
|
1436 |
# Remove any items that are not holdable for this patron |
1436 |
# Remove any items that are not holdable for this patron |
1437 |
# We need to ignore hold counts as the borrower's own hold that will be filled by the checkout |
1437 |
# We need to ignore hold counts as the borrower's own hold that will be filled by the checkout |
1438 |
# could prevent them from placing further holds |
1438 |
# could prevent them from placing further holds |
1439 |
@items = grep { CanItemBeReserved( $patron, $_, undef, { ignore_hold_counts => 1 } )->{status} eq 'OK' } @items; |
1439 |
@items = grep { C4::Reserves::CanItemBeReserved( $patron, $_, undef, { ignore_hold_counts => 1 } )->{status} eq 'OK' } @items; |
1440 |
|
1440 |
|
1441 |
my $items_count = scalar @items; |
1441 |
my $items_count = scalar @items; |
1442 |
|
1442 |
|
Lines 2432-2438
sub AddReturn {
Link Here
|
2432 |
# launch the Checkreserves routine to find any holds |
2432 |
# launch the Checkreserves routine to find any holds |
2433 |
my ($resfound, $resrec); |
2433 |
my ($resfound, $resrec); |
2434 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2434 |
my $lookahead= C4::Context->preference('ConfirmFutureHolds'); #number of days to look for future holds |
2435 |
($resfound, $resrec, undef) = CheckReserves( $item, $lookahead ) unless ( $item->withdrawn ); |
2435 |
($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item, $lookahead ) unless ( $item->withdrawn ); |
2436 |
# 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) |
2436 |
# 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) |
2437 |
if ( $resfound and $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) { |
2437 |
if ( $resfound and $resfound eq "Waiting" and $branch ne $resrec->{branchcode} ) { |
2438 |
my $hold = C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } ); |
2438 |
my $hold = C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } ); |
Lines 3054-3060
sub CanBookBeRenewed {
Link Here
|
3054 |
if ( $item->current_holds->search( { non_priority => 0 } )->count ); |
3054 |
if ( $item->current_holds->search( { non_priority => 0 } )->count ); |
3055 |
|
3055 |
|
3056 |
|
3056 |
|
3057 |
my ( $status, $matched_reserve, $possible_holds ) = CheckReserves($item); |
3057 |
my ( $status, $matched_reserve, $possible_holds ) = C4::Reserves::CheckReserves($item); |
3058 |
my @fillable_holds = (); |
3058 |
my @fillable_holds = (); |
3059 |
foreach my $possible_hold ( @{$possible_holds} ) { |
3059 |
foreach my $possible_hold ( @{$possible_holds} ) { |
3060 |
push @fillable_holds, $possible_hold unless $possible_hold->{non_priority}; |
3060 |
push @fillable_holds, $possible_hold unless $possible_hold->{non_priority}; |
3061 |
- |
|
|