Bug 15685: POD
[koha.git] / Koha / Acquisition / Basket.pm
1 package Koha::Acquisition::Basket;
2
3 # Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz>
4 #
5 # This file is part of Koha.
6 #
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
10 # version.
11 #
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.
15 #
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.
19
20 use Modern::Perl;
21
22 use Koha::Database;
23
24 use base qw( Koha::Object );
25
26 =head1 NAME
27
28 Koha::Acquisition::Basket - Koha Basket Object class
29
30 =head1 API
31
32 =head2 Class Methods
33
34 =cut
35
36 =head3 bookseller
37
38 Returns the vendor
39
40 =cut
41
42 sub bookseller {
43     my ($self) = @_;
44     my $bookseller_rs = $self->_result->booksellerid;
45     return Koha::Acquisition::Bookseller->_new_from_dbic( $bookseller_rs );
46 }
47
48
49 =head3 effective_create_items
50
51 Returns C<create_items> for this basket, falling back to C<AcqCreateItem> if unset.
52
53 =cut
54
55 sub effective_create_items {
56     my ( $self ) = @_;
57
58     return $self->create_items || C4::Context->preference('AcqCreateItem');
59 }
60
61 =head2 Internal methods
62
63 =head3 _type
64
65 =cut
66
67 sub _type {
68     return 'Aqbasket';
69 }
70
71 =head1 AUTHOR
72
73 Aleisha Amohia <aleisha@catalyst.net.nz>
74 Catalyst IT
75
76 =cut
77
78 1;