my $dat = GetBiblioData($biblionumber);
my $canReserve = CanBookBeReserved( $borrowerinfo->{borrowernumber}, $biblionumber );
+ $canReserve //= '';
if ( $canReserve eq 'OK' ) {
#All is OK and we can continue
my $branch = C4::Circulation::_GetCircControlBranch($item, $borrowerinfo);
my $branchitemrule = GetBranchItemRule( $branch, $item->{'itype'} );
- my $policy_holdallowed = 1;
$item->{'holdallowed'} = $branchitemrule->{'holdallowed'};
- if ( $branchitemrule->{'holdallowed'} == 0 ||
- ( $branchitemrule->{'holdallowed'} == 1 &&
- $borrowerinfo->{'branchcode'} ne $item->{'homebranch'} ) ) {
- $policy_holdallowed = 0;
- }
-
if (
- $policy_holdallowed
- && !$item->{cantreserve}
+ !$item->{cantreserve}
&& IsAvailableForItemLevelRequest($item, $borrowerinfo)
&& CanItemBeReserved(
$borrowerinfo->{borrowernumber}, $itemnumber
$reserve{'notes'} = $res->{'reservenotes'};
$reserve{'wait'} =
( ( defined $res->{'found'} and $res->{'found'} eq 'W' ) or ( $res->{'priority'} eq '0' ) );
- $reserve{'constrainttypea'} = ( $res->{'constrainttype'} eq 'a' );
- $reserve{'constrainttypeo'} = ( $res->{'constrainttype'} eq 'o' );
$reserve{'voldesc'} = $res->{'volumeddesc'};
$reserve{'ccode'} = $res->{'ccode'};
$reserve{'barcode'} = $res->{'barcode'};