Bug 17600: Standardize our EXPORT_OK
[srvgit] / Koha / Cash / Register / Cashups.pm
1 package Koha::Cash::Register::Cashups;
2
3 # This file is part of Koha.
4 #
5 # Koha is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # Koha is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18 use Modern::Perl;
19
20
21 use Koha::Database;
22 use Koha::Cash::Register::Cashup;
23
24 use base qw(Koha::Cash::Register::Actions);
25
26 =head1 NAME
27
28 Koha::Cash::Register::Actions - Koha Cash Register Action Object set class
29
30 =head1 API
31
32 =head2 Class methods
33
34 =head3 search
35
36     my $cashups = Koha::Cash::Register::Cashups->search( $where, $attr );
37
38 Returns a list of cash register cashups.
39
40 =cut
41
42 sub search {
43     my ( $self, $where, $attr ) = @_;
44
45     unless ( exists $attr->{order_by} ) {
46         $attr->{order_by} =
47           [ { '-asc' => 'register_id' }, { '-desc' => 'timestamp' } ];
48     }
49
50     my $rs = $self->SUPER::search({ code => 'CASHUP' });
51     return $rs->SUPER::search( $where, $attr );
52 }
53
54 =head3 object_class
55
56 =cut
57
58 sub object_class {
59     return 'Koha::Cash::Register::Cashup';
60 }
61
62 1;