removed unconditional warn
[koha_fer] / acqui / neworderbiblio.pl
index 30f6150..1bb8c67 100755 (executable)
@@ -76,6 +76,7 @@ my $results_per_page = $params->{'num'} || 20;
 my $booksellerid     = $params->{'booksellerid'};
 my $basketno         = $params->{'basketno'};
 my $sub              = $params->{'sub'};
+my $bookseller = GetBookSellerFromId($booksellerid);
 
 # getting the template
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -106,19 +107,15 @@ if (defined $error) {
 my @results;
 
 if ($marcresults) {
-    foreach my $i ( 0 .. scalar @$marcresults ) {
-        my %resultsloop;
-        my $marcrecord = MARC::File::USMARC::decode( $marcresults->[$i] );
+    foreach my $result ( @{$marcresults} ) {
+        my $marcrecord = MARC::File::USMARC::decode( $result );
         my $biblio = TransformMarcToKoha( C4::Context->dbh, $marcrecord, '' );
 
-        #build the hash for the template.
-        %resultsloop = %$biblio;
-        $resultsloop{highlight} = ( $i % 2 ) ? (1) : (0);
-        $resultsloop{booksellerid} = $booksellerid;
-        push @results, \%resultsloop;
+        $biblio->{booksellerid} = $booksellerid;
+        push @results, $biblio;
+
     }
 }
-
 $template->param(
     basketno             => $basketno,
     booksellerid     => $bookseller->{'id'},