---
 C4/Search.pm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index a1e6b4c..7b88a59 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -2055,7 +2055,7 @@ sub searchResults {
                 $onloan_items->{$key} = { %$item };
                 $onloan_items->{$key}->{due_date} = output_pref( { dt => 
dt_from_string( $item->{onloan} ), dateonly => 1 } );
                 $onloan_items->{$key}->{count}++ if $item->{$hbranch};
-                $onloan_items->{$key}->{location}       = $shelflocations->{ 
$item->{location} };
+                $onloan_items->{$key}->{location} = $shelflocations->{ 
$item->{location} };
                 $onloan_items->{$key}->{imageurl} =
                   getitemtypeimagelocation( $search_context, $itemtypes{ 
$item->{itype} }->{imageurl} );
 
@@ -2144,19 +2144,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
-- 
2.5.0
_______________________________________________
Koha-patches mailing list
Koha-patches@lists.koha-community.org
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/

Reply via email to