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

(-)a/C4/Search.pm (-3 / +10 lines)
Lines 1914-1921 sub searchResults { Link Here
1914
                    # FIXME: to avoid having the query the database like this, and to make
1914
                    # FIXME: to avoid having the query the database like this, and to make
1915
                    #        the in transit status count as unavailable for search limiting,
1915
                    #        the in transit status count as unavailable for search limiting,
1916
                    #        should map transit status to record indexed in Zebra.
1916
                    #        should map transit status to record indexed in Zebra.
1917
                    #
1917
1918
                    ($transfertwhen, $transfertfrom, $transfertto) = C4::Circulation::GetTransfers($item->{itemnumber});
1918
                    my $item_object = Koha::Items->find($item->{itemnumber});
1919
                    my $transfer = defined($item_object) ? $item_object->get_transfer : undef;
1920
                    ( $transfertwhen, $transfertfrom, $transfertto ) =
1921
                      defined($transfer)
1922
                      ? (
1923
                        $transfer->datesent, $transfer->frombranch,
1924
                        $transfer->tobranch
1925
                      )
1926
                      : ( '', '', '' );
1919
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1927
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1920
                    if ( C4::Context->preference('UseRecalls') ) {
1928
                    if ( C4::Context->preference('UseRecalls') ) {
1921
                        if ( Koha::Recalls->search({ item_id => $item->{itemnumber}, status => 'waiting' })->count ) {
1929
                        if ( Koha::Recalls->search({ item_id => $item->{itemnumber}, status => 'waiting' })->count ) {
1922
- 

Return to bug 24295