| Lines 1853-1859
          sub searchResults {
      
      
        Link Here | 
        
          | 1853 |         my $items_count           = scalar(@fields); | 1853 |         my $items_count           = scalar(@fields); | 
        
          | 1854 |         my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults'); | 1854 |         my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults'); | 
        
          | 1855 |         my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1; | 1855 |         my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1; | 
            
              | 1856 |         my @hiddenitems; # hidden itemnumbers based on OpacHiddenItems syspref |  |  | 
        
          | 1857 |  | 1856 |  | 
        
          | 1858 |         # loop through every item | 1857 |         # loop through every item | 
        
          | 1859 |         foreach my $field (@fields) { | 1858 |         foreach my $field (@fields) { | 
  
    | Lines 1875-1881
          sub searchResults {
      
      
        Link Here | 
        
          | 1875 |                 # hidden based on OpacHiddenItems syspref | 1874 |                 # hidden based on OpacHiddenItems syspref | 
        
          | 1876 |                 my @hi = C4::Items::GetHiddenItemnumbers($item); | 1875 |                 my @hi = C4::Items::GetHiddenItemnumbers($item); | 
        
          | 1877 |                 if (scalar @hi) { | 1876 |                 if (scalar @hi) { | 
            
              | 1878 |                     push @hiddenitems, @hi; |  |  | 
        
          | 1879 |                     $hideatopac_count++; | 1877 |                     $hideatopac_count++; | 
        
          | 1880 |                     next; | 1878 |                     next; | 
        
          | 1881 |                 } | 1879 |                 } | 
  
    | Lines 1892-1909
          sub searchResults {
      
      
        Link Here | 
        
          | 1892 |                 $item->{'branchname'} = $branches{$item->{$otherbranch}}; | 1890 |                 $item->{'branchname'} = $branches{$item->{$otherbranch}}; | 
        
          | 1893 |             } | 1891 |             } | 
        
          | 1894 |  | 1892 |  | 
          
            
              | 1895 | 			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber}; | 1893 |             my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber}; | 
        
          | 1896 | # For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item | 1894 | # For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item | 
        
          | 1897 |             my $userenv = C4::Context->userenv; | 1895 |             my $userenv = C4::Context->userenv; | 
        
          | 1898 |             if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) { | 1896 |             if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) { | 
        
          | 1899 |                 $onloan_count++; | 1897 |                 $onloan_count++; | 
        
          | 1900 | 				my $key = $prefix . $item->{onloan} . $item->{barcode}; | 1898 | 				my $key = $prefix . $item->{onloan} . $item->{barcode}; | 
            
              |  |  | 1899 |                 $onloan_items->{$key} = { %$item }; | 
        
          | 1901 | 				$onloan_items->{$key}->{due_date} = format_date($item->{onloan}); | 1900 | 				$onloan_items->{$key}->{due_date} = format_date($item->{onloan}); | 
        
          | 1902 | 				$onloan_items->{$key}->{count}++ if $item->{$hbranch}; | 1901 | 				$onloan_items->{$key}->{count}++ if $item->{$hbranch}; | 
            
              | 1903 | 				$onloan_items->{$key}->{branchname} = $item->{branchname}; |  |  | 
        
          | 1904 | 				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} }; | 1902 | 				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} }; | 
            
              | 1905 | 				$onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber}; |  |  | 
            
              | 1906 | 				$onloan_items->{$key}->{description} = $item->{description}; | 
        
          | 1907 | 				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 1903 | 				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 
        
          | 1908 |                 # if something's checked out and lost, mark it as 'long overdue' | 1904 |                 # if something's checked out and lost, mark it as 'long overdue' | 
        
          | 1909 |                 if ( $item->{itemlost} ) { | 1905 |                 if ( $item->{itemlost} ) { | 
  
    | Lines 1981-2005
          sub searchResults {
      
      
        Link Here | 
        
          | 1981 |                     $other_count++; | 1977 |                     $other_count++; | 
        
          | 1982 |  | 1978 |  | 
        
          | 1983 |                     my $key = $prefix . $item->{status}; | 1979 |                     my $key = $prefix . $item->{status}; | 
          
            
              | 1984 |                     foreach (qw(withdrawn itemlost damaged branchname itemcallnumber)) { | 1980 |                     $other_items->{$key} = { %$item }; | 
            
              | 1985 |                         $other_items->{$key}->{$_} = $item->{$_}; |  |  | 
            
              | 1986 |                     } | 
        
          | 1987 |                     $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0; | 1981 |                     $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0; | 
        
          | 1988 |                     $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0; | 1982 |                     $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0; | 
        
          | 1989 |                     $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan}; | 1983 |                     $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan}; | 
        
          | 1990 | 					$other_items->{$key}->{count}++ if $item->{$hbranch}; | 1984 | 					$other_items->{$key}->{count}++ if $item->{$hbranch}; | 
        
          | 1991 | 					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} }; | 1985 | 					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} }; | 
            
              | 1992 | 					$other_items->{$key}->{description} = $item->{description}; |  |  | 
        
          | 1993 | 					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 1986 | 					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 
        
          | 1994 |                 } | 1987 |                 } | 
        
          | 1995 |                 # item is available | 1988 |                 # item is available | 
        
          | 1996 |                 else { | 1989 |                 else { | 
        
          | 1997 |                     $can_place_holds = 1; | 1990 |                     $can_place_holds = 1; | 
        
          | 1998 |                     $available_count++; | 1991 |                     $available_count++; | 
            
              |  |  | 1992 |                     $available_items->{$prefix} = { %$item }; | 
        
          | 1999 | 					$available_items->{$prefix}->{count}++ if $item->{$hbranch}; | 1993 | 					$available_items->{$prefix}->{count}++ if $item->{$hbranch}; | 
            
              | 2000 | 					foreach (qw(branchname itemcallnumber description)) { |  |  | 
            
              | 2001 |                     	$available_items->{$prefix}->{$_} = $item->{$_}; | 
            
              | 2002 | 					} | 
        
          | 2003 | 					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} }; | 1994 | 					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} }; | 
        
          | 2004 | 					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 1995 | 					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} ); | 
        
          | 2005 |                 } | 1996 |                 } | 
  
    | Lines 2031-2037
          sub searchResults {
      
      
        Link Here | 
        
          | 2031 |         warn $marcrecord->as_formatted if $DEBUG; | 2022 |         warn $marcrecord->as_formatted if $DEBUG; | 
        
          | 2032 | 	my $interface = $search_context eq 'opac' ? 'OPAC' : ''; | 2023 | 	my $interface = $search_context eq 'opac' ? 'OPAC' : ''; | 
        
          | 2033 | 	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { | 2024 | 	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) { | 
          
            
              | 2034 |             $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems); | 2025 |             $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", [@available_items_loop, @onloan_items_loop, @other_items_loop], 1); | 
        
          | 2035 | 	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs | 2026 | 	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs | 
        
          | 2036 |         } | 2027 |         } | 
        
          | 2037 |  | 2028 |  |