Lines 88-103
if ( $type eq 'str8' && $borrower ) {
Link Here
|
88 |
} |
88 |
} |
89 |
} |
89 |
} |
90 |
|
90 |
|
|
|
91 |
my $can_override = C4::Context->preference('AllowHoldPolicyOverride'); |
91 |
if ( defined $checkitem && $checkitem ne '' ) { |
92 |
if ( defined $checkitem && $checkitem ne '' ) { |
|
|
93 |
|
92 |
my $item = Koha::Items->find($checkitem); |
94 |
my $item = Koha::Items->find($checkitem); |
|
|
95 |
|
93 |
if ( $item->biblionumber ne $biblionumber ) { |
96 |
if ( $item->biblionumber ne $biblionumber ) { |
94 |
$biblionumber = $item->biblionumber; |
97 |
$biblionumber = $item->biblionumber; |
95 |
} |
98 |
} |
96 |
if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) { |
99 |
|
|
|
100 |
my $can_item_be_reserved = CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status}; |
101 |
|
102 |
if ( $can_item_be_reserved ne 'itemAlreadyOnHold' ) { |
97 |
AddReserve( $branch, $borrower->{'borrowernumber'}, |
103 |
AddReserve( $branch, $borrower->{'borrowernumber'}, |
98 |
$biblionumber, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title, |
104 |
$biblionumber, \@realbi, $rank[0], $startdate, $expirationdate, $notes, $title, |
99 |
$checkitem, $found, $itemtype ); |
105 |
$checkitem, $found, $itemtype ); |
100 |
} |
106 |
} |
|
|
107 |
|
101 |
} elsif ($multi_hold) { |
108 |
} elsif ($multi_hold) { |
102 |
my $bibinfo = $bibinfos{$biblionumber}; |
109 |
my $bibinfo = $bibinfos{$biblionumber}; |
103 |
if ( CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) { |
110 |
if ( CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) { |