Lines 1160-1165
sub IsAvailableForItemLevelRequest {
Link Here
|
1160 |
my $any_available = 0; |
1160 |
my $any_available = 0; |
1161 |
|
1161 |
|
1162 |
foreach my $i (@items) { |
1162 |
foreach my $i (@items) { |
|
|
1163 |
|
1164 |
my $circ_control_branch = C4::Circulation::_GetCircControlBranch( $i->unblessed(), $borrower ); |
1165 |
my $branchitemrule = C4::Circulation::GetBranchItemRule( $circ_control_branch, $i->itype ); |
1166 |
|
1163 |
$any_available = 1 |
1167 |
$any_available = 1 |
1164 |
unless $i->itemlost |
1168 |
unless $i->itemlost |
1165 |
|| $i->notforloan > 0 |
1169 |
|| $i->notforloan > 0 |
Lines 1168-1174
sub IsAvailableForItemLevelRequest {
Link Here
|
1168 |
|| IsItemOnHoldAndFound( $i->id ) |
1172 |
|| IsItemOnHoldAndFound( $i->id ) |
1169 |
|| ( $i->damaged |
1173 |
|| ( $i->damaged |
1170 |
&& !C4::Context->preference('AllowHoldsOnDamagedItems') ) |
1174 |
&& !C4::Context->preference('AllowHoldsOnDamagedItems') ) |
1171 |
|| Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan; |
1175 |
|| Koha::ItemTypes->find( $i->effective_itemtype() )->notforloan |
|
|
1176 |
|| $branchitemrule->{holdallowed} == 1 && $borrower->{branchcode} ne $i->homebranch; |
1172 |
} |
1177 |
} |
1173 |
|
1178 |
|
1174 |
return $any_available ? 0 : 1; |
1179 |
return $any_available ? 0 : 1; |
1175 |
- |
|
|