Kleiner Bug beim Reformatieren von Zahlen für die Zahlungsbedingungen.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 2 Feb 2007 16:07:50 +0000 (16:07 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 2 Feb 2007 16:07:50 +0000 (16:07 +0000)
SL/Form.pm

index 90b7d3d..57bd84b 100644 (file)
@@ -1149,11 +1149,11 @@ sub set_payment_options {
       selectrow_query($self, $dbh, $query);
 
     my $total = ($self->{invtotal}) ? $self->{invtotal} : $self->{ordtotal};
+    my $skonto_amount = $self->parse_amount($myconfig, $total) *
+      $self->{percent_skonto};
 
     $self->{skonto_amount} =
-      $self->format_amount($myconfig,
-                           $self->parse_amount($myconfig, $total) *
-                           $self->{percent_skonto}, 2);
+      $self->format_amount($myconfig, $skonto_amount, 2);
 
     if ($self->{"language_id"}) {
       $query =
@@ -1183,9 +1183,7 @@ sub set_payment_options {
         my $saved_numberformat = $myconfig->{"numberformat"};
         $myconfig->{"numberformat"} = $output_numberformat;
         $self->{skonto_amount} =
-          $self->format_amount($myconfig,
-                               $self->parse_amount($myconfig, $total) *
-                               $self->{percent_skonto}, 2);
+          $self->format_amount($myconfig, $skonto_amount, 2);
         $myconfig->{"numberformat"} = $saved_numberformat;
       }
     }