From e346f68585811e25913a2d78fb1191dd3850a7c6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 18 Dec 2019 20:57:33 +0000 Subject: [PATCH] Add inbound_transfers to Koha::Library https://bugs.koha-community.org/show_bug.cgi?id=22569 --- Koha/Library.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Koha/Library.pm b/Koha/Library.pm index 31480e833b..17462b5341 100644 --- a/Koha/Library.pm +++ b/Koha/Library.pm @@ -64,6 +64,20 @@ sub outgoing_transfers { return Koha::Item::Transfers->_new_from_dbic( $rs ); } +=head3 inbound_transfers + + my $inbound_transfers = Koha::Library->inbound_transfers; + +Returns the inbound item transfers associated with this Library. + +=cut + +sub inbound_transfers { + my ( $self ) = @_; + my $rs = $self->_result->branchtransfers_tobranches; + return Koha::Item::Transfers->_new_from_dbic( $rs ); +} + =head3 get_effective_marcorgcode my $marcorgcode = Koha::Libraries->find( $library_id )->get_effective_marcorgcode(); -- 2.20.1