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