1 package Koha::ArticleRequests;
3 # Copyright ByWater Solutions 2015
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.
26 use Koha::ArticleRequest;
27 use Koha::ArticleRequest::Status;
29 use base qw(Koha::Objects);
33 Koha::ArticleRequests - Koha ArticleRequests Object class
46 my ( $self, $branchcode ) = @_;
47 my $params = { status => Koha::ArticleRequest::Status::Pending };
48 $params->{branchcode} = $branchcode if $branchcode;
49 return Koha::ArticleRequests->search( $params );
57 my ( $self, $branchcode ) = @_;
58 my $params = { status => Koha::ArticleRequest::Status::Processing };
59 $params->{branchcode} = $branchcode if $branchcode;
60 return Koha::ArticleRequests->search( $params );
68 my ( $self, $branchcode ) = @_;
69 my $params = { status => Koha::ArticleRequest::Status::Completed };
70 $params->{branchcode} = $branchcode if $branchcode;
71 return Koha::ArticleRequests->search( $params );
79 my ( $self, $branchcode ) = @_;
80 my $params = { status => Koha::ArticleRequest::Status::Canceled };
81 $params->{branchcode} = $branchcode if $branchcode;
82 return Koha::ArticleRequests->search( $params );
90 return 'ArticleRequest';
94 return 'Koha::ArticleRequest';
99 Kyle M Hall <kyle@bywatersolutions.com>