|
Lines 1204-1210
and canreservefromotherbranches.
Link Here
|
| 1204 |
=cut |
1204 |
=cut |
| 1205 |
|
1205 |
|
| 1206 |
sub IsAvailableForItemLevelRequest { |
1206 |
sub IsAvailableForItemLevelRequest { |
| 1207 |
my ( $item, $patron, $pickup_branchcode ) = @_; |
1207 |
my $item = shift; |
|
|
1208 |
my $patron = shift; |
| 1209 |
my $pickup_branchcode = shift; |
| 1210 |
# items_any_available is precalculated status passed from request.pl when set of items |
| 1211 |
# looped outside of IsAvailableForItemLevelRequest to avoid nested loops: |
| 1212 |
my $items_any_available = shift; |
| 1208 |
|
1213 |
|
| 1209 |
my $dbh = C4::Context->dbh; |
1214 |
my $dbh = C4::Context->dbh; |
| 1210 |
# must check the notforloan setting of the itemtype |
1215 |
# must check the notforloan setting of the itemtype |
|
Lines 1239-1244
sub IsAvailableForItemLevelRequest {
Link Here
|
| 1239 |
if ( $on_shelf_holds == 1 ) { |
1244 |
if ( $on_shelf_holds == 1 ) { |
| 1240 |
return 1; |
1245 |
return 1; |
| 1241 |
} elsif ( $on_shelf_holds == 2 ) { |
1246 |
} elsif ( $on_shelf_holds == 2 ) { |
|
|
1247 |
|
| 1248 |
# if we have this param predefined from outer caller sub, we just need |
| 1249 |
# to return it, so we saving from having loop inside other loop: |
| 1250 |
return $items_any_available ? 0 : 1 |
| 1251 |
if defined $items_any_available; |
| 1252 |
|
| 1242 |
my $any_available = ItemsAnyAvailableForHold( { biblionumber => $item->biblionumber, patron => $patron }); |
1253 |
my $any_available = ItemsAnyAvailableForHold( { biblionumber => $item->biblionumber, patron => $patron }); |
| 1243 |
return $any_available ? 0 : 1; |
1254 |
return $any_available ? 0 : 1; |
| 1244 |
} else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) |
1255 |
} else { # on_shelf_holds == 0 "If any unavailable" (the description is rather cryptic and could still be improved) |