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

(-)a/Koha/Item.pm (-2 / +8 lines)
Lines 527-534 sub get_transfers { Link Here
527
    my ($self) = @_;
527
    my ($self) = @_;
528
    my $transfer_rs = $self->_result->branchtransfers->search(
528
    my $transfer_rs = $self->_result->branchtransfers->search(
529
        {
529
        {
530
            datearrived   => undef,
530
            datearrived => undef,
531
            datecancelled => undef
531
            [
532
                { datesent => undef, datecancelled => { '!=' => undef } },
533
                {
534
                    datesent      => { '!=' => undef },
535
                    datecancelled => { '!=' => undef }
536
                }
537
            ]
532
        },
538
        },
533
        {
539
        {
534
            order_by =>
540
            order_by =>
(-)a/Koha/Item/Transfer.pm (-2 / +1 lines)
Lines 110-117 sub in_transit { Link Here
110
    my ($self) = @_;
110
    my ($self) = @_;
111
111
112
    return ( defined( $self->datesent )
112
    return ( defined( $self->datesent )
113
          && !defined( $self->datearrived )
113
          && !defined( $self->datearrived ) );
114
          && !defined( $self->datecancelled ) );
115
}
114
}
116
115
117
=head3 receive
116
=head3 receive
(-)a/catalogue/detail.pl (-7 / +7 lines)
Lines 334-345 foreach my $item (@items) { Link Here
334
    }
334
    }
335
335
336
    # Check the transit status
336
    # Check the transit status
337
    my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber});
337
    my $transfers = $item_object->get_transfers;
338
    if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) {
338
    my $transfer  = $transfers->next;
339
        $item->{transfertwhen} = $transfertwhen;
339
    if ( defined($transfer) && $transfer->in_transit ) {
340
        $item->{transfertfrom} = $transfertfrom;
340
        $item->{transfertwhen} = $transfer->datesent;
341
        $item->{transfertto}   = $transfertto;
341
        $item->{transfertfrom} = $transfer->frombranch;
342
        $item->{nocancel} = 1;
342
        $item->{transfertto}   = $transfer->tobranch;
343
        $item->{nocancel}      = 1;
343
    }
344
    }
344
345
345
    foreach my $f (qw( itemnotes )) {
346
    foreach my $f (qw( itemnotes )) {
346
- 

Return to bug 28520