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

(-)a/C4/Search.pm (-13 / +16 lines)
Lines 1895-1906 sub searchResults { Link Here
1895
            my $userenv = C4::Context->userenv;
1895
            my $userenv = C4::Context->userenv;
1896
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1896
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1897
                $onloan_count++;
1897
                $onloan_count++;
1898
				my $key = $prefix . $item->{onloan} . $item->{barcode};
1898
                my $key = $prefix . $item->{onloan} . $item->{barcode};
1899
                $onloan_items->{$key} = { %$item };
1899
                $onloan_items->{$key} = { %$item };
1900
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1900
                $onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1901
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
1901
                $onloan_items->{$key}->{count}++
1902
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1902
                  if $item->{$hbranch};
1903
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1903
                $onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1904
                $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1904
                # if something's checked out and lost, mark it as 'long overdue'
1905
                # if something's checked out and lost, mark it as 'long overdue'
1905
                if ( $item->{itemlost} ) {
1906
                if ( $item->{itemlost} ) {
1906
                    $onloan_items->{$prefix}->{longoverdue}++;
1907
                    $onloan_items->{$prefix}->{longoverdue}++;
Lines 1980-1998 sub searchResults { Link Here
1980
                    $other_items->{$key} = { %$item };
1981
                    $other_items->{$key} = { %$item };
1981
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1982
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
1982
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1983
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
1983
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
1984
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
1984
					$other_items->{$key}->{count}++ if $item->{$hbranch};
1985
                      if $notforloan_authorised_value and $item->{notforloan};
1985
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1986
                    $other_items->{$key}->{count}++
1986
					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1987
                      if $item->{$hbranch};
1988
                    $other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1989
                    $other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1987
                }
1990
                }
1988
                # item is available
1991
                # item is available
1989
                else {
1992
                else {
1990
                    $can_place_holds = 1;
1993
                    $can_place_holds = 1;
1991
                    $available_count++;
1994
                    $available_count++;
1992
                    $available_items->{$prefix} = { %$item };
1995
                    $available_items->{$prefix} = { %$item };
1993
					$available_items->{$prefix}->{count}++ if $item->{$hbranch};
1996
                    $available_items->{$prefix}->{count}++
1994
					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
1997
                      if $item->{$hbranch};
1995
					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1998
                    $available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
1999
                    $available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1996
                }
2000
                }
1997
            }
2001
            }
1998
        }    # notforloan, item level and biblioitem level
2002
        }    # notforloan, item level and biblioitem level
1999
- 

Return to bug 11213