View | Details | Raw Unified | Return to bug 11213
Collapse All | Expand All

(-)a/C4/Search.pm (-13 / +16 lines)
Lines 1914-1925 sub searchResults { Link Here
1914
            my $userenv = C4::Context->userenv;
1914
            my $userenv = C4::Context->userenv;
1915
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1915
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1916
                $onloan_count++;
1916
                $onloan_count++;
1917
				my $key = $prefix . $item->{onloan} . $item->{barcode};
1917
                my $key = $prefix . $item->{onloan} . $item->{barcode};
1918
                $onloan_items->{$key} = { %$item };
1918
                $onloan_items->{$key} = { %$item };
1919
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1919
                $onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1920
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
1920
                $onloan_items->{$key}->{count}++
1921
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1921
                  if $item->{$hbranch};
1922
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1922
                $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1923
                $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1923
                # if something's checked out and lost, mark it as 'long overdue'
1924
                # if something's checked out and lost, mark it as 'long overdue'
1924
                if ( $item->{itemlost} ) {
1925
                if ( $item->{itemlost} ) {
1925
                    $onloan_items->{$prefix}->{longoverdue}++;
1926
                    $onloan_items->{$prefix}->{longoverdue}++;
Lines 2001-2019 sub searchResults { Link Here
2001
                    $other_items->{$key} = { %$item };
2002
                    $other_items->{$key} = { %$item };
2002
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
2003
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
2003
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
2004
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
2004
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
2005
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
2005
					$other_items->{$key}->{count}++ if $item->{$hbranch};
2006
                      if $notforloan_authorised_value and $item->{notforloan};
2006
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
2007
                    $other_items->{$key}->{count}++
2007
					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2008
                      if $item->{$hbranch};
2009
                    $other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
2010
                    $other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2008
                }
2011
                }
2009
                # item is available
2012
                # item is available
2010
                else {
2013
                else {
2011
                    $can_place_holds = 1;
2014
                    $can_place_holds = 1;
2012
                    $available_count++;
2015
                    $available_count++;
2013
                    $available_items->{$prefix} = { %$item };
2016
                    $available_items->{$prefix} = { %$item };
2014
					$available_items->{$prefix}->{count}++ if $item->{$hbranch};
2017
                    $available_items->{$prefix}->{count}++
2015
					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2018
                      if $item->{$hbranch};
2016
					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2019
                    $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2020
                    $available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2017
                }
2021
                }
2018
            }
2022
            }
2019
        }    # notforloan, item level and biblioitem level
2023
        }    # notforloan, item level and biblioitem level
2020
- 

Return to bug 11213