|
Lines 1325-1332
sub ItemsAnyAvailableAndNotRestricted {
Link Here
|
| 1325 |
|
1325 |
|
| 1326 |
my @items = Koha::Items->search( { biblionumber => $param->{biblionumber} } ); |
1326 |
my @items = Koha::Items->search( { biblionumber => $param->{biblionumber} } ); |
| 1327 |
|
1327 |
|
| 1328 |
my $any_available = 0; |
|
|
| 1329 |
|
| 1330 |
foreach my $i (@items) { |
1328 |
foreach my $i (@items) { |
| 1331 |
my $reserves_control_branch = |
1329 |
my $reserves_control_branch = |
| 1332 |
GetReservesControlBranch( $i->unblessed(), $param->{patron}->unblessed ); |
1330 |
GetReservesControlBranch( $i->unblessed(), $param->{patron}->unblessed ); |
|
Lines 1334-1340
sub ItemsAnyAvailableAndNotRestricted {
Link Here
|
| 1334 |
C4::Circulation::GetBranchItemRule( $reserves_control_branch, $i->itype ); |
1332 |
C4::Circulation::GetBranchItemRule( $reserves_control_branch, $i->itype ); |
| 1335 |
my $item_library = Koha::Libraries->find( { branchcode => $i->homebranch } ); |
1333 |
my $item_library = Koha::Libraries->find( { branchcode => $i->homebranch } ); |
| 1336 |
|
1334 |
|
| 1337 |
$any_available = 1 |
1335 |
# we can return (end the loop) when first one found: |
|
|
1336 |
return 1 |
| 1338 |
unless $i->itemlost |
1337 |
unless $i->itemlost |
| 1339 |
|| $i->notforloan > 0 |
1338 |
|| $i->notforloan > 0 |
| 1340 |
|| $i->withdrawn |
1339 |
|| $i->withdrawn |
|
Lines 1347-1353
sub ItemsAnyAvailableAndNotRestricted {
Link Here
|
| 1347 |
|| $branchitemrule->{holdallowed} == 3 && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } ); |
1346 |
|| $branchitemrule->{holdallowed} == 3 && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } ); |
| 1348 |
} |
1347 |
} |
| 1349 |
|
1348 |
|
| 1350 |
return $any_available; |
1349 |
return 0; |
| 1351 |
} |
1350 |
} |
| 1352 |
|
1351 |
|
| 1353 |
=head2 AlterPriority |
1352 |
=head2 AlterPriority |
| 1354 |
- |
|
|