---
C4/Search.pm | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index 466a10d..27446e5 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1914,12 +1914,13 @@ sub searchResults {
my $userenv = C4::Context->userenv;
if ( $item->{onloan} &&
!(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) &&
$item->{itemlost}) ) {
$onloan_count++;
- my $key = $prefix . $item->{onloan} .
$item->{barcode};
+ my $key = $prefix . $item->{onloan} . $item->{barcode};
$onloan_items->{$key} = { %$item };
- $onloan_items->{$key}->{due_date} =
format_date($item->{onloan});
- $onloan_items->{$key}->{count}++ if
$item->{$hbranch};
- $onloan_items->{$key}->{location} =
$shelflocations->{ $item->{location} };
- $onloan_items->{$key}->{imageurl} =
getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype}
}->{imageurl} );
+ $onloan_items->{$key}->{due_date} =
format_date($item->{onloan});
+ $onloan_items->{$key}->{count}++
+ if $item->{$hbranch};
+ $onloan_items->{$key}->{location} = $shelflocations->{
$item->{location} };
+ $onloan_items->{$key}->{imageurl} = getitemtypeimagelocation(
$search_context, $itemtypes{ $item->{itype} }->{imageurl} );
# if something's checked out and lost, mark it as 'long
overdue'
if ( $item->{itemlost} ) {
$onloan_items->{$prefix}->{longoverdue}++;
@@ -2001,19 +2002,22 @@ sub searchResults {
$other_items->{$key} = { %$item };
$other_items->{$key}->{intransit} = ( $transfertwhen ne ''
) ? 1 : 0;
$other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
- $other_items->{$key}->{notforloan} =
GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
if $notforloan_authorised_value and $item->{notforloan};
- $other_items->{$key}->{count}++ if
$item->{$hbranch};
- $other_items->{$key}->{location} =
$shelflocations->{ $item->{location} };
- $other_items->{$key}->{imageurl} =
getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype}
}->{imageurl} );
+ $other_items->{$key}->{notforloan} =
GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value)
+ if $notforloan_authorised_value and $item->{notforloan};
+ $other_items->{$key}->{count}++
+ if $item->{$hbranch};
+ $other_items->{$key}->{location} = $shelflocations->{
$item->{location} };
+ $other_items->{$key}->{imageurl} =
getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype}
}->{imageurl} );
}
# item is available
else {
$can_place_holds = 1;
$available_count++;
$available_items->{$prefix} = { %$item };
- $available_items->{$prefix}->{count}++
if $item->{$hbranch};
- $available_items->{$prefix}->{location}
= $shelflocations->{ $item->{location} };
- $available_items->{$prefix}->{imageurl}
= getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype}
}->{imageurl} );
+ $available_items->{$prefix}->{count}++
+ if $item->{$hbranch};
+ $available_items->{$prefix}->{location} =
$shelflocations->{ $item->{location} };
+ $available_items->{$prefix}->{imageurl} =
getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype}
}->{imageurl} );
}
}
} # notforloan, item level and biblioitem level
--
1.9.1
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/