Bug 28615: (follow-up) Disable strict mode explicitly
[koha-ffzg.git] / acqui / newordersuggestion.pl
index a0e88e9..f43e201 100755 (executable)
@@ -88,18 +88,18 @@ can be equal to
 
 =cut
 
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Auth;    # get_template_and_user
 use C4::Output;
 use C4::Suggestions;
 use C4::Biblio;
+use C4::Budgets;
 
-use Koha::Acquisition::Bookseller;
+use Koha::Acquisition::Booksellers;
 
-my $input = new CGI;
+my $input = CGI->new;
 
 # getting the CGI params
 my $basketno        = $input->param('basketno');
@@ -137,12 +137,13 @@ my $suggestions_loop = SearchSuggestion(
         STATUS        => 'ACCEPTED'
     }
 );
-my $vendor = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid });
+
+my $vendor = Koha::Acquisition::Booksellers->find( $booksellerid );
 $template->param(
     suggestions_loop        => $suggestions_loop,
     basketno                => $basketno,
     booksellerid              => $booksellerid,
-    name                                       => $vendor->{'name'},
+    name                    => $vendor->name,
     loggedinuser            => $borrowernumber,
     "op_$op"                => 1,
 );