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