@@ -, +, @@ --- Koha/Acquisition/Basket.pm | 4 +++- Koha/Acquisition/Baskets.pm | 10 ++++++---- Koha/Acquisition/Order.pm | 10 +++++++++- 3 files changed, 18 insertions(+), 6 deletions(-) --- a/Koha/Acquisition/Basket.pm +++ a/Koha/Acquisition/Basket.pm @@ -43,7 +43,9 @@ sub effective_create_items { return $self->create_items || C4::Context->preference('AcqCreateItem'); } -=head3 type +=head2 Internal methods + +=head3 _type =cut --- a/Koha/Acquisition/Baskets.pm +++ a/Koha/Acquisition/Baskets.pm @@ -32,11 +32,9 @@ Koha::Acquisition::Baskets - Koha Basket Object set class =head1 API -=head2 Class Methods +=head2 Internal methods -=cut - -=head3 type +=head3 _type =cut @@ -44,6 +42,10 @@ sub _type { return 'Aqbasket'; } +=head3 object_class + +=cut + sub object_class { return 'Koha::Acquisition::Basket'; } --- a/Koha/Acquisition/Order.pm +++ a/Koha/Acquisition/Order.pm @@ -31,7 +31,7 @@ Koha::Acquisition::Order Object class =head1 API -=head2 Class Methods +=head2 Class methods =head3 new @@ -99,6 +99,14 @@ sub add_item { $rs->create({ ordernumber => $self->ordernumber, itemnumber => $itemnumber }); } +=head3 basket + + my $basket = Koha::Acquisition::Orders->find( $id )->basket; + +Returns the basket associated to the order. + +=cut + sub basket { my ( $self ) = @_; return Koha::Acquisition::Baskets->find( $self->{basketno} ); --