Bug 18624: Run time errors when searching authorities with Elastic search 5.3
[koha.git] / Koha / Acquisition / Bookseller.pm
1 package Koha::Acquisition::Bookseller;
2
3 use Modern::Perl;
4
5 use Koha::Database;
6 use base qw( Koha::Object );
7
8 use Koha::DateUtils qw( dt_from_string output_pref );
9
10 use Koha::Acquisition::Bookseller::Contacts;
11 use Koha::Subscriptions;
12
13 sub baskets {
14     my ( $self ) = @_;
15     return $self->{_result}->aqbaskets;
16 }
17
18 sub contacts {
19     my ($self) = @_;
20     return Koha::Acquisition::Bookseller::Contacts->search( { booksellerid => $self->id } );
21 }
22
23 sub subscriptions {
24     my ($self) = @_;
25
26     return Koha::Subscriptions->search( { aqbooksellerid => $self->id } );
27 }
28
29 sub _type {
30     return 'Aqbookseller';
31 }
32
33 1;