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

(-)a/Koha/Item.pm (-2 / +13 lines)
Lines 23-28 use Carp; Link Here
23
23
24
use Koha::Database;
24
use Koha::Database;
25
25
26
use Koha::Item::Transfer;
26
use Koha::Patrons;
27
use Koha::Patrons;
27
use Koha::Libraries;
28
use Koha::Libraries;
28
29
Lines 74-82 sub holding_branch { Link Here
74
    return $self->{_holding_branch};
75
    return $self->{_holding_branch};
75
}
76
}
76
77
77
sub transfer {
78
=head3 get_transfer
79
80
my $transfer = $item->get_transfer;
81
82
Return the transfer if the item is in transit or undef
83
84
=cut
85
86
sub get_transfer {
78
    my ( $self ) = @_;
87
    my ( $self ) = @_;
79
    return $self->_result->branchtransfers->first;
88
    my $transfer_rs = $self->_result->branchtransfers->search({ datearrived => undef })->first;
89
    return unless $transfer_rs;
90
    return Koha::Item::Transfer->_new_from_dbic( $transfer_rs );
80
}
91
}
81
92
82
=head3 last_returned_by
93
=head3 last_returned_by
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-3 / +2 lines)
Lines 604-611 Link Here
604
                                                    [% END %]
604
                                                    [% END %]
605
                                                [% ELSE %]
605
                                                [% ELSE %]
606
                                                    [% IF ( RESERVE.is_in_transit ) %]
606
                                                    [% IF ( RESERVE.is_in_transit ) %]
607
                                                        [% SET transfer = RESERVE.item.transfer %]
607
                                                        [% SET transfer = RESERVE.item.get_transfer %]
608
                                                        Item in transit from <b> [% transfer.frombranch.branchname %]</b> since
608
                                                        Item in transit from <b> [% Branches.GetName( transfer.frombranch ) %]</b> since
609
                                                        [% transfer.datesent | $KohaDates %]
609
                                                        [% transfer.datesent | $KohaDates %]
610
                                                    [% ELSIF ( RESERVE.suspend ) %]
610
                                                    [% ELSIF ( RESERVE.suspend ) %]
611
                                                        Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
611
                                                        Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
612
- 

Return to bug 16686