Bug 8041: lost items are no longer available in search
authorStéphane Delaune <stephane.delaune@biblibre.com>
Thu, 3 May 2012 11:46:51 +0000 (13:46 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 15 May 2012 14:44:50 +0000 (16:44 +0200)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Search.pm

index 33a1d16..3794676 100644 (file)
@@ -1740,7 +1740,7 @@ sub searchResults {
                     }
                     $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;
+                    $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}->{description} = $item->{description};