|
Lines 1225-1231
and canreservefromotherbranches.
Link Here
|
| 1225 |
=cut |
1225 |
=cut |
| 1226 |
|
1226 |
|
| 1227 |
sub IsAvailableForItemLevelRequest { |
1227 |
sub IsAvailableForItemLevelRequest { |
| 1228 |
my ( $item, $patron, $pickup_branchcode ) = @_; |
1228 |
my $item = shift; |
|
|
1229 |
my $patron = shift; |
| 1230 |
my $pickup_branchcode = shift; |
| 1231 |
# items_any_available is precalculated status passed from request.pl when set of items |
| 1232 |
# looped outside of IsAvailableForItemLevelRequest to avoid nested loops: |
| 1233 |
my $items_any_available = shift; |
| 1229 |
|
1234 |
|
| 1230 |
my $dbh = C4::Context->dbh; |
1235 |
my $dbh = C4::Context->dbh; |
| 1231 |
# must check the notforloan setting of the itemtype |
1236 |
# must check the notforloan setting of the itemtype |
|
Lines 1260-1265
sub IsAvailableForItemLevelRequest {
Link Here
|
| 1260 |
if ( $on_shelf_holds == 1 ) { |
1265 |
if ( $on_shelf_holds == 1 ) { |
| 1261 |
return 1; |
1266 |
return 1; |
| 1262 |
} elsif ( $on_shelf_holds == 2 ) { |
1267 |
} elsif ( $on_shelf_holds == 2 ) { |
|
|
1268 |
|
| 1269 |
# if we have this param predefined from outer caller sub, we just need |
| 1270 |
# to return it, so we saving from having loop inside other loop: |
| 1271 |
return $items_any_available ? 0 : 1 |
| 1272 |
if defined $items_any_available; |
| 1273 |
|
| 1263 |
my $any_available = ItemsAnyAvailableForHold( { biblionumber => $item->biblionumber, patron => $patron }); |
1274 |
my $any_available = ItemsAnyAvailableForHold( { biblionumber => $item->biblionumber, patron => $patron }); |
| 1264 |
return $any_available ? 0 : 1; |
1275 |
return $any_available ? 0 : 1; |
| 1265 |
} else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) |
1276 |
} else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) |