From f18af55a39e132c57e25774b94acec8cbc0f280e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 5 Oct 2017 11:12:35 -0300 Subject: [PATCH] Bug 15685: (follow-up) K:A:O->find and ->fetch are no longer used Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- Koha/Edifact/Order.pm | 4 +++- acqui/orderreceive.pl | 3 ++- opac/opac-detail.pl | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm index 05169a509c..ac63a94a9a 100644 --- a/Koha/Edifact/Order.pm +++ b/Koha/Edifact/Order.pm @@ -28,6 +28,8 @@ use Business::ISBN; use Koha::Database; use C4::Budgets qw( GetBudget ); +use Koha::Acquisition::Orders; + Readonly::Scalar my $seg_terminator => q{'}; Readonly::Scalar my $separator => q{+}; Readonly::Scalar my $component_separator => q{:}; @@ -338,7 +340,7 @@ sub name_and_address { sub order_line { my ( $self, $linenumber, $orderline ) = @_; - my $basket = Koha::Acquisition::Order->find( $orderline->ordernumber )->basket; + my $basket = Koha::Acquisition::Orders->find( $orderline->ordernumber )->basket; my $schema = $self->{schema}; if ( !$orderline->biblionumber ) diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 4f9d4fdc12..7952e1dd8f 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -74,6 +74,7 @@ use C4::Suggestions; use C4::Koha; use Koha::Acquisition::Booksellers; +use Koha::Acquisition::Orders; use Koha::DateUtils qw( dt_from_string ); use Koha::ItemTypes; use Koha::Patrons; @@ -111,7 +112,7 @@ unless ( $results and @$results) { # prepare the form for receiving my $order = $results->[0]; -my $basket = Koha::Acquisition::Order->fetch({ordernumber => $ordernumber})->basket; +my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket; # Check if ACQ framework exists my $acq_fw = GetMarcStructure( 1, 'ACQ', { unsafe => 1 } ); diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 36763eae1c..b31a00fe03 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -54,7 +54,7 @@ use Koha::RecordProcessor; use Koha::AuthorisedValues; use Koha::Biblios; use Koha::ItemTypes; -use Koha::Acquisition::Order; +use Koha::Acquisition::Orders; use Koha::Virtualshelves; use Koha::Patrons; use Koha::Ratings; @@ -640,7 +640,7 @@ if ( C4::Context->preference('OPACAcquisitionDetails' ) ) { }); my $total_quantity = 0; for my $order ( @$orders ) { - my $basket = Koha::Acquisition::Order->find( $order->{ordernumber} )->basket; + my $basket = Koha::Acquisition::Orders->find( $order->{ordernumber} )->basket; if ( $basket->effective_create_items eq 'ordering' ) { for my $itemnumber ( C4::Acquisition::GetItemnumbersFromOrder( $order->{ordernumber} ) ) { push @itemnumbers_on_order, $itemnumber; -- 2.39.5