From 74e40c9f887d68f87b1764345a7a44a836dc2ce4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 29 Aug 2018 15:06:42 -0300 Subject: [PATCH] Bug 15184: Add POD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE Signed-off-by: Katrin Fischer --- Koha/Acquisition/Order.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index 0619fc196b..af76ddd48c 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -168,6 +168,14 @@ sub subscription { return Koha::Subscription->_new_from_dbic( $subscription_rs ); } +=head3 items + + my $items = $order->items + +Returns the items associated to the order. + +=cut + sub items { my ( $self ) = @_; # aqorders_items is not a join table @@ -177,6 +185,16 @@ sub items { return Koha::Items->search({ itemnumber => \@itemnumbers }); } +=head3 duplicate_to + + my $duplicated_order = $order->duplicate_to($basket, [$default_values]); + +Duplicate an existing order and attach it to a basket. $default_values can be specified as a hashref +that contain default values for the different order's attributes. +Items will be duplicated as well but barcodes will be set to null. + +=cut + sub duplicate_to { my ( $self, $basket, $default_values ) = @_; my $new_order; -- 2.11.0