Lines 241-247
if ( $query->param('place_reserve') ) {
Link Here
|
241 |
|
241 |
|
242 |
my $item = $itemNum ? Koha::Items->find( $itemNum ) : undef; |
242 |
my $item = $itemNum ? Koha::Items->find( $itemNum ) : undef; |
243 |
# When choosing a specific item, the default pickup library should be dictated by the default hold policy |
243 |
# When choosing a specific item, the default pickup library should be dictated by the default hold policy |
244 |
if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $itemNum ) { |
244 |
if ( ! C4::Context->preference("OPACAllowUserToChooseBranch") && $item ) { |
245 |
my $type = $item->effective_itemtype; |
245 |
my $type = $item->effective_itemtype; |
246 |
my $rule = GetBranchItemRule( $patron->branchcode, $type ); |
246 |
my $rule = GetBranchItemRule( $patron->branchcode, $type ); |
247 |
|
247 |
|
Lines 256-262
if ( $query->param('place_reserve') ) {
Link Here
|
256 |
} |
256 |
} |
257 |
|
257 |
|
258 |
#item may belong to a host biblio, if yes change biblioNum to hosts bilbionumber |
258 |
#item may belong to a host biblio, if yes change biblioNum to hosts bilbionumber |
259 |
if ( $itemNum ) { |
259 |
if ( $item ) { |
260 |
my $hostbiblioNum = $item->biblio->biblionumber; |
260 |
my $hostbiblioNum = $item->biblio->biblionumber; |
261 |
if ( $hostbiblioNum ne $biblioNum ) { |
261 |
if ( $hostbiblioNum ne $biblioNum ) { |
262 |
$biblioNum = $hostbiblioNum; |
262 |
$biblioNum = $hostbiblioNum; |
Lines 278-284
if ( $query->param('place_reserve') ) {
Link Here
|
278 |
|
278 |
|
279 |
my $rank = $biblioData->{rank}; |
279 |
my $rank = $biblioData->{rank}; |
280 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
280 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
281 |
if ( $itemNum ) { |
281 |
if ( $item ) { |
282 |
$canreserve = 1 if CanItemBeReserved( $patron, $item, $branch )->{status} eq 'OK'; |
282 |
$canreserve = 1 if CanItemBeReserved( $patron, $item, $branch )->{status} eq 'OK'; |
283 |
} |
283 |
} |
284 |
else { |
284 |
else { |
285 |
- |
|
|