From 100d3e4fae890efa2d5ab85d57c3f0a27615066d 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 Signed-off-by: Kathleen Milne Signed-off-by: Katrin Fischer --- 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.11.0