Lines 1803-1809
sub searchResults {
Link Here
|
1803 |
my $itembinding_count = 0; |
1803 |
my $itembinding_count = 0; |
1804 |
my $itemdamaged_count = 0; |
1804 |
my $itemdamaged_count = 0; |
1805 |
my $item_in_transit_count = 0; |
1805 |
my $item_in_transit_count = 0; |
1806 |
my $can_place_holds = 0; |
|
|
1807 |
my $item_onhold_count = 0; |
1806 |
my $item_onhold_count = 0; |
1808 |
my $notforloan_count = 0; |
1807 |
my $notforloan_count = 0; |
1809 |
my $items_count = scalar(@fields); |
1808 |
my $items_count = scalar(@fields); |
Lines 1874-1882
sub searchResults {
Link Here
|
1874 |
$onloan_items->{$key}->{longoverdue}++; |
1873 |
$onloan_items->{$key}->{longoverdue}++; |
1875 |
$longoverdue_count++; |
1874 |
$longoverdue_count++; |
1876 |
} |
1875 |
} |
1877 |
else { # can place holds as long as item isn't lost |
|
|
1878 |
$can_place_holds = 1; |
1879 |
} |
1880 |
} |
1876 |
} |
1881 |
|
1877 |
|
1882 |
# items not on loan, but still unavailable ( lost, withdrawn, damaged ) |
1878 |
# items not on loan, but still unavailable ( lost, withdrawn, damaged ) |
Lines 1938-1955
sub searchResults {
Link Here
|
1938 |
$item_onhold_count++ if $reservestatus eq 'Waiting'; |
1934 |
$item_onhold_count++ if $reservestatus eq 'Waiting'; |
1939 |
$item->{status} = ($item->{withdrawn}//q{}) . "-" . ($item->{itemlost}//q{}) . "-" . ($item->{damaged}//q{}) . "-" . ($item->{notforloan}//q{}); |
1935 |
$item->{status} = ($item->{withdrawn}//q{}) . "-" . ($item->{itemlost}//q{}) . "-" . ($item->{damaged}//q{}) . "-" . ($item->{notforloan}//q{}); |
1940 |
|
1936 |
|
1941 |
# can place a hold on a item if |
|
|
1942 |
# not lost nor withdrawn |
1943 |
# not damaged unless AllowHoldsOnDamagedItems is true |
1944 |
# item is either for loan or on order (notforloan < 0) |
1945 |
$can_place_holds = 1 |
1946 |
if ( |
1947 |
!$item->{itemlost} |
1948 |
&& !$item->{withdrawn} |
1949 |
&& ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') ) |
1950 |
&& ( !$item->{notforloan} || $item->{notforloan} < 0 ) |
1951 |
); |
1952 |
|
1953 |
$other_count++; |
1937 |
$other_count++; |
1954 |
|
1938 |
|
1955 |
my $key = $prefix . $item->{status}; |
1939 |
my $key = $prefix . $item->{status}; |
Lines 1966-1972
sub searchResults {
Link Here
|
1966 |
} |
1950 |
} |
1967 |
# item is available |
1951 |
# item is available |
1968 |
else { |
1952 |
else { |
1969 |
$can_place_holds = 1; |
|
|
1970 |
$available_count++; |
1953 |
$available_count++; |
1971 |
$available_items->{$prefix}->{count}++ if $item->{$hbranch}; |
1954 |
$available_items->{$prefix}->{count}++ if $item->{$hbranch}; |
1972 |
foreach (qw(branchname itemcallnumber description)) { |
1955 |
foreach (qw(branchname itemcallnumber description)) { |
Lines 2009-2019
sub searchResults {
Link Here
|
2009 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables); |
1992 |
$oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $xslsyspref, 1, \@hiddenitems, $sysxml, $xslfile, $lang, $xslt_variables); |
2010 |
} |
1993 |
} |
2011 |
|
1994 |
|
|
|
1995 |
my $biblio_object = Koha::Biblios->find( $oldbiblio->{biblionumber} ); |
1996 |
$oldbiblio->{biblio_object} = $biblio_object; |
1997 |
|
1998 |
my $can_place_holds = 1; |
2012 |
# if biblio level itypes are used and itemtype is notforloan, it can't be reserved either |
1999 |
# if biblio level itypes are used and itemtype is notforloan, it can't be reserved either |
2013 |
if (!C4::Context->preference("item-level_itypes")) { |
2000 |
if (!C4::Context->preference("item-level_itypes")) { |
2014 |
if ($itemtype && $itemtype->{notforloan}) { |
2001 |
if ($itemtype && $itemtype->{notforloan}) { |
2015 |
$can_place_holds = 0; |
2002 |
$can_place_holds = 0; |
2016 |
} |
2003 |
} |
|
|
2004 |
} else { |
2005 |
$can_place_holds = $biblio_object->items->filter_by_for_hold()->count; |
2017 |
} |
2006 |
} |
2018 |
$oldbiblio->{norequests} = 1 unless $can_place_holds; |
2007 |
$oldbiblio->{norequests} = 1 unless $can_place_holds; |
2019 |
$oldbiblio->{items_count} = $items_count; |
2008 |
$oldbiblio->{items_count} = $items_count; |
Lines 2062-2069
sub searchResults {
Link Here
|
2062 |
$oldbiblio->{'alternateholdings_count'} = $alternateholdingscount; |
2051 |
$oldbiblio->{'alternateholdings_count'} = $alternateholdingscount; |
2063 |
} |
2052 |
} |
2064 |
|
2053 |
|
2065 |
$oldbiblio->{biblio_object} = Koha::Biblios->find( $oldbiblio->{biblionumber} ); |
|
|
2066 |
|
2067 |
push( @newresults, $oldbiblio ); |
2054 |
push( @newresults, $oldbiblio ); |
2068 |
} |
2055 |
} |
2069 |
|
2056 |
|