From 683905a1651ffaf267a234416e3b5189f574ac30 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 --- 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