From 4b73a2ec0d2180e97e7612ef35a560b9f67ee518 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 POC, tests needed. --- 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 264641f..83c1dbc 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -604,8 +604,9 @@ [% 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.8.1