From cac8b28761f94cba8ce29c09ebf85e6a762b3a40 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=UTF-8 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 --- 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 d721537..55bf14e 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 f2aad35..c26f78f 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.1.4