|
Lines 181-186
if ($multihold) {
Link Here
|
| 181 |
my $itemdata_enumchron = 0; |
181 |
my $itemdata_enumchron = 0; |
| 182 |
my @biblioloop = (); |
182 |
my @biblioloop = (); |
| 183 |
my $not_all_holdable_onloan; |
183 |
my $not_all_holdable_onloan; |
|
|
184 |
my %pickplaces; |
| 185 |
my @itembrlist; |
| 186 |
my $itembranchesloop; |
| 184 |
foreach my $biblionumber (@biblionumbers) { |
187 |
foreach my $biblionumber (@biblionumbers) { |
| 185 |
|
188 |
|
| 186 |
my %biblioloopiter = (); |
189 |
my %biblioloopiter = (); |
|
Lines 307-312
foreach my $biblionumber (@biblionumbers) {
Link Here
|
| 307 |
$item->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $item->{itype} }{imageurl} ); |
310 |
$item->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $item->{itype} }{imageurl} ); |
| 308 |
$item->{homebranchname} = $branches->{ $item->{homebranch} }{branchname}; |
311 |
$item->{homebranchname} = $branches->{ $item->{homebranch} }{branchname}; |
| 309 |
|
312 |
|
|
|
313 |
if( !$item->{notforloan} and !$item->{lost} and !$item->{withdrawn} and !$item->{damaged} ) { |
| 314 |
push @itembrlist, {'itemnumber' => $itemnumber,'brcode' => $item->{homebranch},'brname' => $item->{homebranchname}}; |
| 315 |
} |
| 310 |
# if the holdingbranch is different than the homebranch, we show the |
316 |
# if the holdingbranch is different than the homebranch, we show the |
| 311 |
# holdingbranch of the document too |
317 |
# holdingbranch of the document too |
| 312 |
if ( $item->{homebranch} ne $item->{holdingbranch} ) { |
318 |
if ( $item->{homebranch} ne $item->{holdingbranch} ) { |
|
Lines 416-421
foreach my $biblionumber (@biblionumbers) {
Link Here
|
| 416 |
) |
422 |
) |
| 417 |
{ |
423 |
{ |
| 418 |
$item->{available} = 1; |
424 |
$item->{available} = 1; |
|
|
425 |
$pickplaces{$item->{'homebranch'}}=$item->{'homebranchname'}; |
| 419 |
$num_available++ unless $not_all_holdable_onloan; |
426 |
$num_available++ unless $not_all_holdable_onloan; |
| 420 |
} |
427 |
} |
| 421 |
elsif ( C4::Context->preference('AllowHoldPolicyOverride') ) { |
428 |
elsif ( C4::Context->preference('AllowHoldPolicyOverride') ) { |
|
Lines 448-453
foreach my $biblionumber (@biblionumbers) {
Link Here
|
| 448 |
push @bibitemloop, $biblioitem; |
455 |
push @bibitemloop, $biblioitem; |
| 449 |
} |
456 |
} |
| 450 |
|
457 |
|
|
|
458 |
if ( C4::Context->preference('PickupHoldOnlyFromItemBranches') ){ |
| 459 |
$template->param( PickupHoldOnlyFromItemBranches => 1 ); |
| 460 |
$pickplaces{'any'}='' if scalar(keys %pickplaces) > 1; |
| 461 |
%pickplaces = {} if $not_all_holdable_onloan; |
| 462 |
$itembranchesloop = GetBranchesPartLoop(\%pickplaces); |
| 463 |
} |
| 451 |
# existingreserves building |
464 |
# existingreserves building |
| 452 |
my @reserveloop; |
465 |
my @reserveloop; |
| 453 |
$reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); |
466 |
$reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber, all_dates => 1 }); |
|
Lines 524-529
foreach my $biblionumber (@biblionumbers) {
Link Here
|
| 524 |
|
537 |
|
| 525 |
if ( C4::Context->preference('IndependentBranches') && $flags->{'superlibrarian'} != 1 ) { |
538 |
if ( C4::Context->preference('IndependentBranches') && $flags->{'superlibrarian'} != 1 ) { |
| 526 |
$reserve{'branchloop'} = [ GetBranchDetail($res->{'branchcode'}) ]; |
539 |
$reserve{'branchloop'} = [ GetBranchDetail($res->{'branchcode'}) ]; |
|
|
540 |
} elsif (C4::Context->preference('PickupHoldOnlyFromItemBranches') ) { |
| 541 |
$res->{'branchcode'}||='any'; |
| 542 |
my %brlist; |
| 543 |
foreach ( @itembrlist ) { |
| 544 |
my $canreserve = CanItemBeReserved( $reserve{'borrowernumber'},$_->{'itemnumber'} ); |
| 545 |
if ( !defined($canreserve) or $canreserve > 0 ){ # this to get the itembranch on location list even if the item is not any more on loan (return=undef) |
| 546 |
$brlist{$_->{'brcode'}} = $_->{'brname'}; |
| 547 |
} |
| 548 |
} |
| 549 |
$brlist{'any'} = '' if scalar(keys %brlist) > 1; |
| 550 |
$reserve{'branchloop'}=GetBranchesPartLoop(\%brlist,$res->{'branchcode'}); |
| 527 |
} else { |
551 |
} else { |
| 528 |
$reserve{'branchloop'} = GetBranchesLoop($res->{'branchcode'}); |
552 |
$reserve{'branchloop'} = GetBranchesLoop($res->{'branchcode'}); |
| 529 |
} |
553 |
} |
|
Lines 535-545
foreach my $biblionumber (@biblionumbers) {
Link Here
|
| 535 |
my $time = time(); |
559 |
my $time = time(); |
| 536 |
|
560 |
|
| 537 |
$template->param( |
561 |
$template->param( |
| 538 |
branchloop => GetBranchesLoop($userbranch), |
562 |
branchloop => $itembranchesloop ? $itembranchesloop : GetBranchesLoop($userbranch), |
| 539 |
time => $time, |
563 |
time => $time, |
| 540 |
fixedRank => $fixedRank, |
564 |
fixedRank => $fixedRank, |
| 541 |
); |
565 |
); |
| 542 |
|
|
|
| 543 |
# display infos |
566 |
# display infos |
| 544 |
$template->param( |
567 |
$template->param( |
| 545 |
optionloop => \@optionloop, |
568 |
optionloop => \@optionloop, |
| 546 |
- |
|
|