Bug 18072: Add Koha::Biblio->can_be_transferred
authorLari Taskula <lari.taskula@jns.fi>
Fri, 10 Feb 2017 13:11:17 +0000 (15:11 +0200)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 18 Jul 2018 17:42:41 +0000 (17:42 +0000)
commitbd87407798bb9edd61be8400873d2f4641784445
tree4b482dec212475c583169e56599afa3a60f57a7f
parent118a714c1d8bfe646fac9aa37f4a38a02e2035be
Bug 18072: Add Koha::Biblio->can_be_transferred

This patch adds a new method Koha::Biblio->can_be_transferred. The method checks
if at least one of the item of that biblio can be transferred to desired location.

This method will be useful for building a smarter pickup location list for holds,
because we will be able to hide those libraries to which none of the items of
this biblio can be transferred to due to branch transfer limits (see Bug 7614).

To test:
1. prove t/db_dependent/Koha/Biblios.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Biblio.pm
Koha/Item.pm
t/db_dependent/Koha/Biblios.t