3 # Copyright ByWater Solutions 2014
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 use base qw(Koha::Objects);
32 Koha::Patron - Koha Patron Object class
40 =head3 search_housebound_choosers
42 Returns all Patrons which are Housebound choosers.
46 sub search_housebound_choosers {
48 my $cho = $self->_resultset
49 ->search_related('housebound_role', {
50 housebound_chooser => 1,
51 })->search_related('borrowernumber');
52 return Koha::Patrons->_new_from_dbic($cho);
55 =head3 search_housebound_deliverers
57 Returns all Patrons which are Housebound deliverers.
61 sub search_housebound_deliverers {
63 my $del = $self->_resultset
64 ->search_related('housebound_role', {
65 housebound_deliverer => 1,
66 })->search_related('borrowernumber');
67 return Koha::Patrons->_new_from_dbic($del);
79 return 'Koha::Patron';
84 Kyle M Hall <kyle@bywatersolutions.com>