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

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

Return to bug 13516