1 package Koha::CurbsidePickup;
3 # This file is part of Koha.
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 3 of the License, or (at your option) any later
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License along
15 # with Koha; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 use base qw(Koha::Object);
28 use Koha::CurbsidePickupIssues;
32 Koha::CurbsidePickup - Koha Curbside Pickup Object class
40 Return the checkouts linked to this pickup
47 my @pi = Koha::CurbsidePickupIssues->search({ curbside_pickup_id => $self->id })->as_list;
49 my @checkouts = map { $_->checkout } @pi;
50 @checkouts = grep { defined $_ } @checkouts;
57 Return the patron linked to this pickup
63 my $rs = $self->_result->borrowernumber;
65 return Koha::Patron->_new_from_dbic( $rs );
68 =head3 staged_by_staff
70 Return the staff member that staged this pickup
76 my $rs = $self->_result->staged_by;
78 return Koha::Patron->_new_from_dbic( $rs );
83 Return the branch associated with this pickup
89 my $rs = $self->_result->branchcode;
91 return Koha::Library->_new_from_dbic( $rs );
94 =head2 Internal methods
101 return 'CurbsidePickup';