Bug 19940: Koha::Biblio - Remove GetBiblioItemInfosOf
[koha.git] / acqui / invoice.pl
index 9906341..0f2933a 100755 (executable)
@@ -26,8 +26,7 @@ Invoice details
 
 =cut
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use C4::Auth;
@@ -84,8 +83,8 @@ elsif ( $op && $op eq 'mod' ) {
     ModInvoice(
         invoiceid             => $invoiceid,
         invoicenumber         => $invoicenumber,
-        shipmentdate          => output_pref( { str => scalar $input->param('shipmentdate'), dateformat => 'iso', dateonly => 1 } ),
-        billingdate           => output_pref( { str => scalar $input->param('billingdate'),  dateformat => 'iso', dateonly => 1 } ),
+        shipmentdate          => scalar output_pref( { str => scalar $input->param('shipmentdate'), dateformat => 'iso', dateonly => 1 } ),
+        billingdate           => scalar output_pref( { str => scalar $input->param('billingdate'),  dateformat => 'iso', dateonly => 1 } ),
         shipmentcost          => $shipmentcost,
         shipmentcost_budgetid => $shipment_budget_id
     );
@@ -124,8 +123,8 @@ my $total_tax_value = 0;
 foreach my $order (@$orders) {
     my $line = get_infos( $order, $bookseller);
 
-    $line->{total_tax_excluded} = Koha::Number::Price->new( $line->{unitprice_tax_excluded} * $line->{quantity} )->format;
-    $line->{total_tax_included} = Koha::Number::Price->new( $line->{unitprice_tax_included} * $line->{quantity} )->format;
+    $line->{total_tax_excluded} = $line->{unitprice_tax_excluded} * $line->{quantity};
+    $line->{total_tax_included} = $line->{unitprice_tax_included} * $line->{quantity};
 
     $line->{tax_value} = $line->{tax_value_on_receiving};
     $line->{tax_rate} = $line->{tax_rate_on_receiving};
@@ -201,7 +200,6 @@ sub get_infos {
     $line{budget_name}    = $budget->{budget_name};
 
     if ( $line{uncertainprice} ) {
-        $template->param( uncertainprices => 1 );
         $line{rrp} .= ' (Uncertain)';
     }
     if ( $line{'title'} ) {