Bug 20212: Clean parcel.pl
[koha-ffzg.git] / acqui / uncertainprice.pl
index 93f7975..82b98b2 100755 (executable)
@@ -55,7 +55,7 @@ use C4::Biblio qw/GetBiblioData/;
 use Koha::Acquisition::Booksellers;
 use Koha::Acquisition::Baskets;
 
-my $input=new CGI;
+my $input=CGI->new;
 
 my ($template, $loggedinuser, $cookie)
     = get_template_and_user({template_name => "acqui/uncertainprice.tt",
@@ -88,6 +88,7 @@ if ( $op eq 'validate' ) {
     for (my $i=0; $i < $count; $i++) {
         my $order = pop(@orders);
         my $ordernumber = $order->{ordernumber};
+        next unless ($input->param('qty'.$ordernumber));
         my $order_as_from_db=GetOrder($order->{ordernumber});
         $order->{'listprice'} = $input->param('price'.$ordernumber);
         $order->{'ecost'}= $input->param('price'.$ordernumber) - (($input->param('price'.$ordernumber) /100) * $bookseller->discount);