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

(-)a/C4/Search.pm (-6 / +7 lines)
Lines 1832-1839 sub searchResults { Link Here
1832
            elsif ($item->{$otherbranch}) {	# Last resort
1832
            elsif ($item->{$otherbranch}) {	# Last resort
1833
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1833
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1834
            }
1834
            }
1835
            $item->{homebranch} = $branches{ $item->{homebranch} } if defined $item->{homebranch};
1835
            $item->{homebranch}    &&= $branches{ $item->{homebranch}    };
1836
            $item->{holdingbranch} = $branches{ $item->{holdingbranch} } if defined $item->{holdingbranch};
1836
            $item->{holdingbranch} &&= $branches{ $item->{holdingbranch} };
1837
1837
1838
            my $prefix =
1838
            my $prefix =
1839
                ( $item->{$hbranch} ? $item->{$hbranch} . '--' : q{} )
1839
                ( $item->{$hbranch} ? $item->{$hbranch} . '--' : q{} )
Lines 1842-1852 sub searchResults { Link Here
1842
              . ( $item->{itemcallnumber} ? $item->{itemcallnumber} : q{} );
1842
              . ( $item->{itemcallnumber} ? $item->{itemcallnumber} : q{} );
1843
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1843
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1844
            my $itemtype = C4::Context->preference("item-level_itypes")? $item->{itype}: $oldbiblio->{itemtype};
1844
            my $itemtype = C4::Context->preference("item-level_itypes")? $item->{itype}: $oldbiblio->{itemtype};
1845
            $item->{itemtype} = $itemtype;
1845
            $item->{itemtype}               = $itemtype;
1846
            $item->{location} = $item->{location} && exists $shelflocations->{$item->{location}} ? $shelflocations->{$item->{location}} : $item->{location} ;
1846
            $item->{location}               = $shelflocations->{$item->{location}}              || $item->{location} ;
1847
            $item->{notforloan_description} = exists $notforloan_descriptions->{ $item->{notforloan} } ? $notforloan_descriptions->{ $item->{notforloan} } : "Not for loan";
1847
            $item->{notforloan_description} = $notforloan_descriptions->{ $item->{notforloan} } || "Not for loan";
1848
            $item->{ccode_description} = defined $item->{ccode} && exists $ccodes->{ $item->{ccode} } ? $ccodes->{ $item->{ccode} } :  $item->{ccode};
1848
            $item->{ccode_description}      = $ccodes->{ $item->{ccode} }                       || $item->{ccode};
1849
            $item->{notforloan_itemtype} = defined $itemtype && exists $itemtypes{ $itemtype } ? $itemtypes{ $itemtype }->{notforloan} : undef;
1849
            $item->{notforloan_itemtype} = defined $itemtype && exists $itemtypes{ $itemtype } ? $itemtypes{ $itemtype }->{notforloan} : undef;
1850
1850
            if ( $item->{onloan}
1851
            if ( $item->{onloan}
1851
                and $logged_in_user
1852
                and $logged_in_user
1852
                and !( $patron_category_hide_lost_items and $item->{itemlost} ) )
1853
                and !( $patron_category_hide_lost_items and $item->{itemlost} ) )
(-)a/C4/XSLT.pm (-4 / +4 lines)
Lines 334-341 sub buildKohaItemsNamespace { Link Here
334
            $recalls_count = Koha::Recalls->search({ item_id => $item->{itemnumber}, status => 'waiting' })->count;
334
            $recalls_count = Koha::Recalls->search({ item_id => $item->{itemnumber}, status => 'waiting' })->count;
335
        }
335
        }
336
336
337
        my $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
337
        # Don't call GetReserveStatus if we don't need it
338
        my $transfer = C4::Circulation::GetTransfers($item->{itemnumber});
338
        my $reservestatus = !$recalls_count ? C4::Reserves::GetReserveStatus( $item->{itemnumber} ) : undef;
339
339
340
340
        if ($recalls_count) {
341
        if ($recalls_count) {
341
            # recalls take priority over holds
342
            # recalls take priority over holds
Lines 350-356 sub buildKohaItemsNamespace { Link Here
350
            $status = 'other';
351
            $status = 'other';
351
            $substatus = 'Waiting';
352
            $substatus = 'Waiting';
352
        }
353
        }
353
        elsif ($transfer) {
354
        elsif (C4::Circulation::GetTransfers($item->{itemnumber})){
354
            $status = 'other';
355
            $status = 'other';
355
            $substatus = 'In transit';
356
            $substatus = 'In transit';
356
        }
357
        }
357
- 

Return to bug 28702