]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[mfinanz.git] / SL / Form.pm
index 32ea04d85eff96b529961eb921d0fccc26c709dd..2ba19b65cea9ca933ddbcce091bbfce371cf9297 100644 (file)
@@ -270,7 +270,7 @@ sub new {
   $self->{action}  =  lc $self->{action};
   $self->{action}  =~ s/( |-|,|\#)/_/g;
 
-  $self->{version} =  "2.6.1 Beta 1";
+  $self->{version} =  "2.6.1";
 
   $main::lxdebug->leave_sub();
 
@@ -720,7 +720,7 @@ sub _prepare_html_template {
   my ($self, $file, $additional_params) = @_;
   my $language;
 
-  if (!defined(%main::myconfig) || !defined($main::myconfig{"countrycode"})) {
+  if (!%::myconfig || !$::myconfig{"countrycode"}) {
     $language = $main::language;
   } else {
     $language = $main::myconfig{"countrycode"};
@@ -1813,6 +1813,7 @@ sub set_payment_options {
     $amounts{invtotal} = $self->{invtotal};
     $amounts{total}    = $self->{total};
   }
+  $amounts{skonto_in_percent} = 100.0 * $self->{percent_skonto};
 
   map { $amounts{$_} = $self->parse_amount($myconfig, $amounts{$_}) } keys %amounts;
 
@@ -1866,6 +1867,8 @@ sub set_payment_options {
 
   map { $self->{payment_terms} =~ s/<%${_}%>/$formatted_amounts{$_}/g; } keys %formatted_amounts;
 
+  $self->{skonto_in_percent} = $formatted_amounts{skonto_in_percent};
+
   $main::lxdebug->leave_sub();
 
 }