From 94056d8df2a150cf3d3274f9b6c3b765fa5f6d4e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 16 Jun 2020 11:36:19 +0100 Subject: [PATCH] Bug 25757: Add item relation to Koha::Item::Transfer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Kathleen Milne Signed-off-by: Katrin Fischer Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart --- Koha/Item/Transfer.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm index 4eb16b2347..50868aba76 100644 --- a/Koha/Item/Transfer.pm +++ b/Koha/Item/Transfer.pm @@ -33,6 +33,20 @@ Koha::Item::Transfer - Koha Item Transfer Object class =cut +=head3 item + + my $item = $transfer->item; + +Returns the associated item for this transfer. + +=cut + +sub item { + my ($self) = @_; + my $item_rs = $self->_result->itemnumber; + return Koha::Item->_new_from_dbic($item_rs); +} + =head3 type =cut -- 2.39.5