View | Details | Raw Unified | Return to bug 28527
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 123-130 sub in_transit { Link Here
123
    my ($self) = @_;
123
    my ($self) = @_;
124
124
125
    return ( defined( $self->datesent )
125
    return ( defined( $self->datesent )
126
          && !defined( $self->datearrived )
126
          && !defined( $self->datearrived ) );
127
          && !defined( $self->datecancelled ) );
128
}
127
}
129
128
130
=head3 receive
129
=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 28527