Bug 15685: (follow-up) K:A:O->find and ->fetch are no longer used
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 Oct 2017 14:12:35 +0000 (11:12 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Oct 2017 16:08:46 +0000 (13:08 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Koha/Edifact/Order.pm
acqui/orderreceive.pl
opac/opac-detail.pl

index 05169a5..ac63a94 100644 (file)
@@ -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 )
index 4f9d4fd..7952e1d 100755 (executable)
@@ -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 } );
index 36763ea..b31a00f 100755 (executable)
@@ -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;