Lines 30-35
use C4::XSLT;
Link Here
|
30 |
use C4::Branch; |
30 |
use C4::Branch; |
31 |
use C4::Reserves; # CheckReserves |
31 |
use C4::Reserves; # CheckReserves |
32 |
use C4::Debug; |
32 |
use C4::Debug; |
|
|
33 |
use C4::Items; |
34 |
use YAML; |
33 |
use URI::Escape; |
35 |
use URI::Escape; |
34 |
|
36 |
|
35 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); |
37 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); |
Lines 1584-1591
sub searchResults {
Link Here
|
1584 |
$item->{$code} = $field->subfield( $subfieldstosearch{$code} ); |
1586 |
$item->{$code} = $field->subfield( $subfieldstosearch{$code} ); |
1585 |
} |
1587 |
} |
1586 |
|
1588 |
|
1587 |
my $hbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch' : 'holdingbranch'; |
1589 |
# Hidden items |
1588 |
my $otherbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'holdingbranch' : 'homebranch'; |
1590 |
my @items = ($item); |
|
|
1591 |
my (@hiddenitems) = GetHiddenItemnumbers(@items); |
1592 |
$item->{'hideatopac'} = 1 if (@hiddenitems); |
1593 |
|
1594 |
my $hbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'homebranch' : 'holdingbranch'; |
1595 |
my $otherbranch = C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ? 'holdingbranch' : 'homebranch'; |
1596 |
|
1589 |
# set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one |
1597 |
# set item's branch name, use HomeOrHoldingBranch syspref first, fall back to the other one |
1590 |
if ($item->{$hbranch}) { |
1598 |
if ($item->{$hbranch}) { |
1591 |
$item->{'branchname'} = $branches{$item->{$hbranch}}; |
1599 |
$item->{'branchname'} = $branches{$item->{$hbranch}}; |
Lines 1658-1663
sub searchResults {
Link Here
|
1658 |
|| $item->{itemlost} |
1666 |
|| $item->{itemlost} |
1659 |
|| $item->{damaged} |
1667 |
|| $item->{damaged} |
1660 |
|| $item->{notforloan} > 0 |
1668 |
|| $item->{notforloan} > 0 |
|
|
1669 |
|| $item->{hideatopac} |
1661 |
|| $reservestatus eq 'Waiting' |
1670 |
|| $reservestatus eq 'Waiting' |
1662 |
|| ($transfertwhen ne '')) |
1671 |
|| ($transfertwhen ne '')) |
1663 |
{ |
1672 |
{ |
Lines 1669-1679
sub searchResults {
Link Here
|
1669 |
$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; |
1678 |
$item->{status} = $item->{wthdrawn} . "-" . $item->{itemlost} . "-" . $item->{damaged} . "-" . $item->{notforloan}; |
1670 |
$other_count++; |
1679 |
$other_count++; |
1671 |
|
1680 |
|
1672 |
my $key = $prefix . $item->{status}; |
1681 |
my $key = $prefix . $item->{status}; |
1673 |
foreach (qw(wthdrawn itemlost damaged branchname itemcallnumber)) { |
1682 |
foreach (qw(wthdrawn itemlost damaged branchname itemcallnumber hideatopac)) { |
1674 |
$other_items->{$key}->{$_} = $item->{$_}; |
1683 |
$other_items->{$key}->{$_} = $item->{$_}; |
1675 |
} |
1684 |
} |
1676 |
$other_items->{$key}->{intransit} = ($transfertwhen ne '') ? 1 : 0; |
1685 |
$other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0; |
1677 |
$other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0; |
1686 |
$other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0; |
1678 |
$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value; |
1687 |
$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value; |
1679 |
$other_items->{$key}->{count}++ if $item->{$hbranch}; |
1688 |
$other_items->{$key}->{count}++ if $item->{$hbranch}; |
Lines 1685-1691
sub searchResults {
Link Here
|
1685 |
$can_place_holds = 1; |
1694 |
$can_place_holds = 1; |
1686 |
$available_count++; |
1695 |
$available_count++; |
1687 |
$available_items->{$prefix}->{count}++ if $item->{$hbranch}; |
1696 |
$available_items->{$prefix}->{count}++ if $item->{$hbranch}; |
1688 |
foreach (qw(branchname itemcallnumber)) { |
1697 |
foreach (qw(branchname itemcallnumber hideatopac)) { |
1689 |
$available_items->{$prefix}->{$_} = $item->{$_}; |
1698 |
$available_items->{$prefix}->{$_} = $item->{$_}; |
1690 |
} |
1699 |
} |
1691 |
$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} }; |
1700 |
$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} }; |