From 8b49b7912b4abcb4d96d74d8d2427d30f9e65622 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=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kathleen Milne Signed-off-by: Katrin Fischer Signed-off-by: Joonas Kylmälä --- 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.20.1