From 2e6d622c61ca0afbb545e6615aa11d6d081c2083 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sun, 3 Jul 2016 15:32:47 +0100 Subject: [PATCH] Bug 16686: Fix "Item in transit from since" in Holds tab MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit POC, tests needed. Alternative patch works for me. Signed-off-by: Marc Véron Signed-off-by: Marc Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit 4ecb11eaa1e69a461f34ecd4875071d2c7c69e3f) Signed-off-by: Frédéric Demians --- Koha/Item.pm | 5 +++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index d721537a62..55bf14ec81 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -74,6 +74,11 @@ sub holding_branch { return $self->{_holding_branch}; } +sub transfer { + my ( $self ) = @_; + return $self->_result->branchtransfers->first; +} + =head3 last_returned_by Gets and sets the last borrower to return an item. diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index f2aad351b7..c26f78f3e1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -625,8 +625,9 @@ Using this account is not recommended because some parts of Koha will not functi [% END %] [% ELSE %] [% IF ( RESERVE.is_in_transit ) %] - Item in transit from [% RESERVE.frombranch %] since - [% RESERVE.datesent | $KohaDates %] + [% SET transfer = RESERVE.item.transfer %] + Item in transit from [% transfer.frombranch.branchname %] since + [% transfer.datesent | $KohaDates %] [% ELSIF ( RESERVE.suspend ) %] Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %] [% ELSE %] -- 2.39.5