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

(-)a/C4/Search.pm (-11 / +15 lines)
Lines 2096-2116 sub searchResults { Link Here
2096
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
2096
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
2097
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
2097
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
2098
            my $userenv = C4::Context->userenv;
2098
            my $userenv = C4::Context->userenv;
2099
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
2099
            if ( $item->{onloan}
2100
                && !( C4::Members::GetHideLostItemsPreference( $userenv->{'number'} ) && $item->{itemlost} ) )
2101
            {
2100
                $onloan_count++;
2102
                $onloan_count++;
2101
				my $key = $prefix . $item->{onloan} . $item->{barcode};
2103
                my $key = $prefix . $item->{onloan} . $item->{barcode};
2102
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
2104
                $onloan_items->{$key}->{due_date} = format_date( $item->{onloan} );
2103
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
2105
                $onloan_items->{$key}->{count}++ if $item->{$hbranch};
2104
				$onloan_items->{$key}->{branchname} = $item->{branchname};
2106
                $onloan_items->{$key}->{branchname}     = $item->{branchname};
2105
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
2107
                $onloan_items->{$key}->{location}       = $shelflocations->{ $item->{location} };
2106
				$onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
2108
                $onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
2107
				$onloan_items->{$key}->{description} = $item->{description};
2109
                $onloan_items->{$key}->{description}    = $item->{description};
2108
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2110
                $onloan_items->{$key}->{imageurl} =
2111
                  getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2112
2109
                # if something's checked out and lost, mark it as 'long overdue'
2113
                # if something's checked out and lost, mark it as 'long overdue'
2110
                if ( $item->{itemlost} ) {
2114
                if ( $item->{itemlost} ) {
2111
                    $onloan_items->{$prefix}->{longoverdue}++;
2115
                    $onloan_items->{$prefix}->{longoverdue}++;
2112
                    $longoverdue_count++;
2116
                    $longoverdue_count++;
2113
                } else {	# can place holds as long as item isn't lost
2117
                }
2118
                else {    # can place holds as long as item isn't lost
2114
                    $can_place_holds = 1;
2119
                    $can_place_holds = 1;
2115
                }
2120
                }
2116
            }
2121
            }
2117
- 

Return to bug 13516