Bug 17600: Standardize our EXPORT_OK
[srvgit] / Koha / Checkouts / ReturnClaims.pm
1 package Koha::Checkouts::ReturnClaims;
2
3 # Copyright ByWater Solutions 2019
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # Koha is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20 use Modern::Perl;
21
22
23 use Koha::Database;
24
25 use Koha::Checkouts::ReturnClaim;
26
27 use base qw(Koha::Objects);
28
29 =head1 NAME
30
31 Koha::Checkouts::ReturnClaims - Koha ReturnClaim object set class
32
33 =head1 API
34
35 =head2 Class Methods
36
37 =cut
38
39 =head3 unresolved
40
41 =cut
42
43 sub unresolved {
44     my ($self) = @_;
45
46     my $results = $self->_resultset()->search_rs( { resolved_on => undef } );
47
48     return Koha::Checkouts::ReturnClaims->_new_from_dbic( $results );
49 }
50
51 =head3 resolved
52
53 =cut
54
55 sub resolved {
56     my ($self) = @_;
57
58     my $results = $self->_resultset()->search_rs( { resolved_on => { '!=' => undef } } );
59
60     return Koha::Checkouts::ReturnClaims->_new_from_dbic( $results );
61 }
62
63 =head3 type
64
65 =cut
66
67 sub _type {
68     return 'ReturnClaim';
69 }
70
71 =head3 object_class
72
73 =cut
74
75 sub object_class {
76     return 'Koha::Checkouts::ReturnClaim';
77 }
78
79 =head1 AUTHOR
80
81 Kyle M Hall <kyle@bywatersolutions.com>
82
83 =cut
84
85 1;