Kosmetik: Perltidy-Lauf nach den Einstellungen in doc/programmierrichtlinien.txt... release-2.2.0
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 3 Feb 2006 14:46:22 +0000 (14:46 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 3 Feb 2006 14:46:22 +0000 (14:46 +0000)
31 files changed:
SL/AP.pm
SL/AR.pm
SL/CA.pm
SL/CT.pm
SL/DATEV.pm
SL/Form.pm
SL/GL.pm
SL/IC.pm
SL/IS.pm
SL/LXDebug.pm
SL/OE.pm
SL/RP.pm
SL/USTVA.pm
bin/mozilla/am.pl
bin/mozilla/ar.pl
bin/mozilla/bp.pl
bin/mozilla/ca.pl
bin/mozilla/cp.pl
bin/mozilla/ct.pl
bin/mozilla/datev.pl
bin/mozilla/gl.pl
bin/mozilla/ic.pl
bin/mozilla/io.pl
bin/mozilla/is.pl
bin/mozilla/kopf.pl
bin/mozilla/licenses.pl
bin/mozilla/menunew.pl
bin/mozilla/oe.pl
bin/mozilla/rc.pl
bin/mozilla/rp.pl
bin/mozilla/ustva.pl

index 2a486c8..e909890 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -442,7 +442,7 @@ sub ap_transactions {
   push @a, "employee" if $self->{l_employee};
   my $sortorder = join ', ', $form->sort_columns(@a);
   $sortorder = $form->{sort} if $form->{sort};
   push @a, "employee" if $self->{l_employee};
   my $sortorder = join ', ', $form->sort_columns(@a);
   $sortorder = $form->{sort} if $form->{sort};
-  
+
   $query .= "WHERE $where
              ORDER by $sortorder";
 
   $query .= "WHERE $where
              ORDER by $sortorder";
 
index 76cea55..42f8c1c 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -83,9 +83,10 @@ sub post_transaction {
 
   $form->{amount} = $form->{netamount};
 
 
   $form->{amount} = $form->{netamount};
 
-  $form->{tax} = 0;
+  $form->{tax}       = 0;
   $form->{netamount} = 0;
   $form->{total_tax} = 0;
   $form->{netamount} = 0;
   $form->{total_tax} = 0;
+
   # taxincluded doesn't make sense if there is no amount
 
   $form->{taxincluded} = 0 if ($form->{amount} == 0);
   # taxincluded doesn't make sense if there is no amount
 
   $form->{taxincluded} = 0 if ($form->{amount} == 0);
@@ -114,7 +115,8 @@ sub post_transaction {
         $form->{netamount} += $form->{"amount_$i"};
       } else {
         $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
         $form->{netamount} += $form->{"amount_$i"};
       } else {
         $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
-        $form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
+        $form->{"tax_$i"} =
+          $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
         $form->{netamount} += $form->{"amount_$i"};
       }
     }
         $form->{netamount} += $form->{"amount_$i"};
       }
     }
index 3517a34..4453a9f 100644 (file)
--- a/SL/CA.pm
+++ b/SL/CA.pm
@@ -164,7 +164,7 @@ sub all_transactions {
     $where .= $fromto;
     $AR_PAID = "";
     $AP_PAID = "";
     $where .= $fromto;
     $AR_PAID = "";
     $AP_PAID = "";
-    $glwhere = ""; # note! gl will be aliased as "a" later...
+    $glwhere = "";    # note! gl will be aliased as "a" later...
   }
   my $sortorder = join ', ',
     $form->sort_columns(qw(transdate reference description));
   }
   my $sortorder = join ', ',
     $form->sort_columns(qw(transdate reference description));
@@ -323,14 +323,14 @@ sub all_transactions {
 
   foreach my $id (@id) {
 
 
   foreach my $id (@id) {
 
-      # NOTE: 
-      #  Postgres is really picky about the order of implicit CROSS JOINs with ','
-      #  if you alias the  tables and want to use the alias later in another JOIN.
-      #  the alias you want to use has to be the most recent in the list, otherwise
-      #  Postgres will overwrite the alias internally and complain.
-      #  For this reason, in the next 3 SELECTs, the 'a' alias is last in the list.
-      #  Don't change this, and if you do, substitute the ',' with CROSS JOIN
-      #  ... that also works.
+    # NOTE:
+    #  Postgres is really picky about the order of implicit CROSS JOINs with ','
+    #  if you alias the  tables and want to use the alias later in another JOIN.
+    #  the alias you want to use has to be the most recent in the list, otherwise
+    #  Postgres will overwrite the alias internally and complain.
+    #  For this reason, in the next 3 SELECTs, the 'a' alias is last in the list.
+    #  Don't change this, and if you do, substitute the ',' with CROSS JOIN
+    #  ... that also works.
 
     # get all transactions
     $query .= qq|$union
 
     # get all transactions
     $query .= qq|$union
index 308a36e..ab5d70e 100644 (file)
--- a/SL/CT.pm
+++ b/SL/CT.pm
@@ -232,7 +232,8 @@ sub save_customer {
       $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
         if ($form->{"selected_cp_${_}"});
   } qw(title greeting));
       $form->{"cp_${_}"} = $form->{"selected_cp_${_}"}
         if ($form->{"selected_cp_${_}"});
   } qw(title greeting));
-#
+
+  #
   # escape '
   map { $form->{$_} =~ s/\'/\'\'/g }
     qw(customernumber name street zipcode city country homepage contact notes cp_title cp_greeting language pricegroup);
   # escape '
   map { $form->{$_} =~ s/\'/\'\'/g }
     qw(customernumber name street zipcode city country homepage contact notes cp_title cp_greeting language pricegroup);
@@ -318,7 +319,7 @@ sub save_customer {
               ustid = '$form->{ustid}',
               username = '$form->{username}',
               salesman_id = '$form->{salesman_id}',
               ustid = '$form->{ustid}',
               username = '$form->{username}',
               salesman_id = '$form->{salesman_id}',
-              user_password = | . $dbh->quote($form->{user_password}) .qq|,
+              user_password = | . $dbh->quote($form->{user_password}) . qq|,
               c_vendor_id = '$form->{c_vendor_id}',
               klass = '$form->{klass}'
              WHERE id = $form->{id}|;
               c_vendor_id = '$form->{c_vendor_id}',
               klass = '$form->{klass}'
              WHERE id = $form->{id}|;
index 36fe80d..9c617db 100644 (file)
@@ -588,7 +588,7 @@ sub kne_buchungsexport {
   my $evfile      = "EV01";
   my @ed_versionsets;
   my $fileno = 0;
   my $evfile      = "EV01";
   my @ed_versionsets;
   my $fileno = 0;
-  
+
   $form->header;
   print qq|
   <html>
   $form->header;
   print qq|
   <html>
@@ -616,8 +616,8 @@ sub kne_buchungsexport {
     $remaining_bytes -= length($header);
 
     while (scalar(@{ $form->{DATEV} }) > 0) {
     $remaining_bytes -= length($header);
 
     while (scalar(@{ $form->{DATEV} }) > 0) {
-      $transaction    = shift @{ $form->{DATEV} };
-      $trans_lines    = scalar(@{$transaction});
+      $transaction = shift @{ $form->{DATEV} };
+      $trans_lines = scalar(@{$transaction});
       $counter++;
       if (($counter % 500) == 0) {
         print("$counter ");
       $counter++;
       if (($counter % 500) == 0) {
         print("$counter ");
@@ -829,7 +829,7 @@ sub kne_buchungsexport {
     print(EV $ed_versionset[$file]);
   }
   close(EV);
     print(EV $ed_versionset[$file]);
   }
   close(EV);
-print qq|<br>Done. <br></body>
+  print qq|<br>Done. <br></body>
 </html>
 |;
   ###
 </html>
 |;
   ###
@@ -865,8 +865,7 @@ sub kne_stammdatenexport {
     qq|SELECT c.accno, c.description FROM chart c WHERE c.accno >=|
     . $dbh->quote($form->{accnofrom}) . qq|
            AND c.accno <= |
     qq|SELECT c.accno, c.description FROM chart c WHERE c.accno >=|
     . $dbh->quote($form->{accnofrom}) . qq|
            AND c.accno <= |
-    . $dbh->quote($form->{accnoto})
-    . qq| ORDER BY c.accno|;
+    . $dbh->quote($form->{accnoto}) . qq| ORDER BY c.accno|;
 
   $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
   $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
index 68e6683..8670d60 100644 (file)
@@ -195,7 +195,7 @@ sub unescape {
 sub quote {
   my ($self, $str) = @_;
 
 sub quote {
   my ($self, $str) = @_;
 
-  if ($str && ! ref($str)) {
+  if ($str && !ref($str)) {
     $str =~ s/"/&quot;/g;
   }
 
     $str =~ s/"/&quot;/g;
   }
 
@@ -203,11 +203,10 @@ sub quote {
 
 }
 
 
 }
 
-
 sub unquote {
   my ($self, $str) = @_;
 
 sub unquote {
   my ($self, $str) = @_;
 
-  if ($str && ! ref($str)) {
+  if ($str && !ref($str)) {
     $str =~ s/&quot;/"/g;
   }
 
     $str =~ s/&quot;/"/g;
   }
 
@@ -215,17 +214,24 @@ sub unquote {
 
 }
 
 
 }
 
 sub hide_form {
   my $self = shift;
 
   if (@_) {
 sub hide_form {
   my $self = shift;
 
   if (@_) {
-    for (@_) { print qq|<input type=hidden name="$_" value="|.$self->quote($self->{$_}).qq|">\n| }
+    for (@_) {
+      print qq|<input type=hidden name="$_" value="|
+        . $self->quote($self->{$_})
+        . qq|">\n|;
+    }
   } else {
     delete $self->{header};
   } else {
     delete $self->{header};
-    for (sort keys %$self) { print qq|<input type=hidden name="$_" value="|.$self->quote($self->{$_}).qq|">\n| }
+    for (sort keys %$self) {
+      print qq|<input type=hidden name="$_" value="|
+        . $self->quote($self->{$_})
+        . qq|">\n|;
+    }
   }
   }
-  
+
 }
 
 sub error {
 }
 
 sub error {
@@ -452,17 +458,17 @@ sub write_trigger {
     push @triggers, qq|
        Calendar.setup(
       {
     push @triggers, qq|
        Calendar.setup(
       {
-      inputField : "|.(shift).qq|",
+      inputField : "| . (shift) . qq|",
       ifFormat :"$ifFormat",
       ifFormat :"$ifFormat",
-      align : "|.(shift).qq|", 
-      button : "|.(shift).qq|"
+      align : "| .  (shift) . qq|", 
+      button : "| . (shift) . qq|"
       }
       );
        |;
   }
   $jsscript = qq|
        <script type="text/javascript">
       }
       );
        |;
   }
   $jsscript = qq|
        <script type="text/javascript">
-       <!--|.join("", @triggers).qq|//-->
+       <!--| . join("", @triggers) . qq|//-->
         </script>
         |;
 
         </script>
         |;
 
@@ -505,12 +511,12 @@ sub format_amount {
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $amount, $places, $dash) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $amount, $places, $dash) = @_;
-  
+
   #Workaround for $format_amount calls without $places
   #Workaround for $format_amount calls without $places
-  if (!defined $places){
-  (my $dec) = ($amount =~ /\.(\d+)/);
-  $places           = length $dec;
-  }                    
+  if (!defined $places) {
+    (my $dec) = ($amount =~ /\.(\d+)/);
+    $places = length $dec;
+  }
 
   if ($places =~ /\d/) {
     $amount = $self->round_amount($amount, $places);
 
   if ($places =~ /\d/) {
     $amount = $self->round_amount($amount, $places);
@@ -518,7 +524,7 @@ sub format_amount {
 
   # is the amount negative
   my $negative = ($amount < 0);
 
   # is the amount negative
   my $negative = ($amount < 0);
-  my $fillup = "";
+  my $fillup   = "";
 
   if ($amount != 0) {
     if ($myconfig->{numberformat} && ($myconfig->{numberformat} ne '1000.00'))
 
   if ($amount != 0) {
     if ($myconfig->{numberformat} && ($myconfig->{numberformat} ne '1000.00'))
@@ -532,19 +538,19 @@ sub format_amount {
         $amount =~ s/\d{3,}?/$&,/g;
         $amount =~ s/,$//;
         $amount = join '', reverse split //, $amount;
         $amount =~ s/\d{3,}?/$&,/g;
         $amount =~ s/,$//;
         $amount = join '', reverse split //, $amount;
-        $amount .= "\.$dec".$fillup if ($places ne '' && $places*1 != 0);
+        $amount .= "\.$dec" . $fillup if ($places ne '' && $places * 1 != 0);
       }
 
       if ($myconfig->{numberformat} eq '1.000,00') {
         $amount =~ s/\d{3,}?/$&./g;
         $amount =~ s/\.$//;
         $amount = join '', reverse split //, $amount;
       }
 
       if ($myconfig->{numberformat} eq '1.000,00') {
         $amount =~ s/\d{3,}?/$&./g;
         $amount =~ s/\.$//;
         $amount = join '', reverse split //, $amount;
-        $amount .= ",$dec".$fillup if ($places ne '' && $places*1 != 0);
+        $amount .= ",$dec" . $fillup if ($places ne '' && $places * 1 != 0);
       }
 
       if ($myconfig->{numberformat} eq '1000,00') {
         $amount = "$whole";
       }
 
       if ($myconfig->{numberformat} eq '1000,00') {
         $amount = "$whole";
-        $amount .= ",$dec" .$fillup if ($places ne '' && $places*1 != 0);
+        $amount .= ",$dec" . $fillup if ($places ne '' && $places * 1 != 0);
       }
 
       if ($dash =~ /-/) {
       }
 
       if ($dash =~ /-/) {
@@ -576,29 +582,39 @@ sub parse_amount {
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $amount) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $amount) = @_;
-  $main::lxdebug->message(LXDebug::DEBUG2, "Start amount: $amount");  
-  if ($myconfig->{in_numberformat} == 1){
+  $main::lxdebug->message(LXDebug::DEBUG2, "Start amount: $amount");
+
+  if ($myconfig->{in_numberformat} == 1) {
+
     # Extra input number format 1000.00 or 1000,00
     # Extra input number format 1000.00 or 1000,00
-    $main::lxdebug->message(LXDebug::DEBUG2, "in_numberformat: " . $main::locale->text('1000,00 or 1000.00'));
+    $main::lxdebug->message(LXDebug::DEBUG2,
+              "in_numberformat: " . $main::locale->text('1000,00 or 1000.00'));
     $amount =~ s/,/\./g;
     $amount =~ s/,/\./g;
+
     #$main::lxdebug->message(LXDebug::DEBUG2, "1.Parsed Number: $amount") if ($amount);
     $amount = scalar reverse $amount;
     #$main::lxdebug->message(LXDebug::DEBUG2, "1.Parsed Number: $amount") if ($amount);
     $amount = scalar reverse $amount;
+
     #$main::lxdebug->message(LXDebug::DEBUG2, "2.Parsed Number: $amount") if ($amount);
     $amount =~ s/\./DOT/;
     #$main::lxdebug->message(LXDebug::DEBUG2, "2.Parsed Number: $amount") if ($amount);
     $amount =~ s/\./DOT/;
+
     #$main::lxdebug->message(LXDebug::DEBUG2, "3.Parsed Number: $amount") if ($amount);
     $amount =~ s/\.//g;
     #$main::lxdebug->message(LXDebug::DEBUG2, "3.Parsed Number: $amount") if ($amount);
     $amount =~ s/\.//g;
+
     #$main::lxdebug->message(LXDebug::DEBUG2, "4.Parsed Number: $amount") if ($amount);
     $amount =~ s/DOT/\./;
     #$main::lxdebug->message(LXDebug::DEBUG2, "4.Parsed Number: $amount") if ($amount);
     $amount =~ s/DOT/\./;
+
     #$main::lxdebug->message(LXDebug::DEBUG2, "5.Parsed Number:" . $amount) if ($amount);
     #$main::lxdebug->message(LXDebug::DEBUG2, "5.Parsed Number:" . $amount) if ($amount);
-    $amount = scalar reverse $amount ;
-    $main::lxdebug->message(LXDebug::DEBUG2, "Parsed amount:" . $amount . "\n");
+    $amount = scalar reverse $amount;
+    $main::lxdebug->message(LXDebug::DEBUG2,
+                            "Parsed amount:" . $amount . "\n");
 
     return ($amount * 1);
 
   }
 
     return ($amount * 1);
 
   }
-  $main::lxdebug->message(LXDebug::DEBUG2, "in_numberformat: " . $main::locale->text('equal Outputformat'));
-  $main::lxdebug->message(LXDebug::DEBUG2, " = numberformat: $myconfig->{numberformat}");
+  $main::lxdebug->message(LXDebug::DEBUG2,
+              "in_numberformat: " . $main::locale->text('equal Outputformat'));
+  $main::lxdebug->message(LXDebug::DEBUG2,
+                          " = numberformat: $myconfig->{numberformat}");
   if (   ($myconfig->{numberformat} eq '1.000,00')
       || ($myconfig->{numberformat} eq '1000,00')) {
     $amount =~ s/\.//g;
   if (   ($myconfig->{numberformat} eq '1.000,00')
       || ($myconfig->{numberformat} eq '1000,00')) {
     $amount =~ s/\.//g;
@@ -606,14 +622,15 @@ sub parse_amount {
   }
 
   if ($myconfig->{numberformat} eq "1'000.00") {
   }
 
   if ($myconfig->{numberformat} eq "1'000.00") {
-      $amount =~ s/'//g;
+    $amount =~ s/'//g;
   }
 
   $amount =~ s/,//g;
   }
 
   $amount =~ s/,//g;
-  
-  $main::lxdebug->message(LXDebug::DEBUG2, "Parsed amount:" . $amount. "\n") if ($amount);
+
+  $main::lxdebug->message(LXDebug::DEBUG2, "Parsed amount:" . $amount . "\n")
+    if ($amount);
   $main::lxdebug->leave_sub();
   $main::lxdebug->leave_sub();
-  
+
   return ($amount * 1);
 }
 
   return ($amount * 1);
 }
 
@@ -625,20 +642,18 @@ sub round_amount {
 
   # Rounding like "Kaufmannsrunden"
   # Descr. http://de.wikipedia.org/wiki/Rundung
 
   # Rounding like "Kaufmannsrunden"
   # Descr. http://de.wikipedia.org/wiki/Rundung
-  # Inspired by 
+  # Inspired by
   # http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
   # Solves Bug: 189
   # Udo Spallek
   # http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
   # Solves Bug: 189
   # Udo Spallek
-  $amount       = $amount * (10 ** ($places));
-  $round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
+  $amount = $amount * (10**($places));
+  $round_amount = int($amount + .5 * ($amount <=> 0)) / (10**($places));
 
   $main::lxdebug->leave_sub();
 
   return $round_amount;
 
   $main::lxdebug->leave_sub();
 
   return $round_amount;
-  
-}
-
 
 
+}
 
 sub parse_template {
   $main::lxdebug->enter_sub();
 
 sub parse_template {
   $main::lxdebug->enter_sub();
@@ -754,8 +769,11 @@ sub parse_template {
           }
 
           # Yes we need a manual page break -- or the user has forced one
           }
 
           # Yes we need a manual page break -- or the user has forced one
-          if ((($current_line + $lines) > $lpp) ||
-              ($self->{"_forced_pagebreaks"} && grep(/^${current_row}$/, @{$self->{"_forced_pagebreaks"}}))) {
+          if (
+             (($current_line + $lines) > $lpp)
+             || ($self->{"_forced_pagebreaks"}
+               && grep(/^${current_row}$/, @{ $self->{"_forced_pagebreaks"} }))
+            ) {
             my $pb = $pagebreak;
 
             # replace the special variables <%sumcarriedforward%>
             my $pb = $pagebreak;
 
             # replace the special variables <%sumcarriedforward%>
@@ -1042,7 +1060,7 @@ sub format_string {
   my %unique_fields;
 
   %unique_fields = map({ $_ => 1 } @fields);
   my %unique_fields;
 
   %unique_fields = map({ $_ => 1 } @fields);
-  @fields = keys(%unique_fields);
+  @fields        = keys(%unique_fields);
 
   foreach my $field (@fields) {
     next unless ($self->{$field} =~ /\<pagebreak\>/);
 
   foreach my $field (@fields) {
     next unless ($self->{$field} =~ /\<pagebreak\>/);
@@ -1295,7 +1313,7 @@ sub get_exchangerate {
   $main::lxdebug->enter_sub();
 
   my ($self, $dbh, $curr, $transdate, $fld) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self, $dbh, $curr, $transdate, $fld) = @_;
-  
+
   unless ($transdate) {
     $main::lxdebug->leave_sub();
     return "";
   unless ($transdate) {
     $main::lxdebug->leave_sub();
     return "";
@@ -1348,8 +1366,9 @@ sub add_shipto {
   my ($self, $dbh, $id) = @_;
 ##LINET
   my $shipto;
   my ($self, $dbh, $id) = @_;
 ##LINET
   my $shipto;
-  foreach
-    my $item (qw(name department_1 department_2 street zipcode city country contact phone fax email)) {
+  foreach my $item (
+    qw(name department_1 department_2 street zipcode city country contact phone fax email)
+    ) {
     if ($self->{"shipto$item"}) {
       $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
     }
     if ($self->{"shipto$item"}) {
       $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
     }
@@ -1357,7 +1376,8 @@ sub add_shipto {
   }
 
   if ($shipto) {
   }
 
   if ($shipto) {
-    my $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, shiptostreet,
+    my $query =
+      qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, shiptostreet,
                    shiptozipcode, shiptocity, shiptocountry, shiptocontact,
                   shiptophone, shiptofax, shiptoemail) VALUES ($id,
                   '$self->{shiptoname}', '$self->{shiptodepartment_1}', '$self->{shiptodepartment_2}', '$self->{shiptostreet}',
                    shiptozipcode, shiptocity, shiptocountry, shiptocontact,
                   shiptophone, shiptofax, shiptoemail) VALUES ($id,
                   '$self->{shiptoname}', '$self->{shiptodepartment_1}', '$self->{shiptodepartment_2}', '$self->{shiptostreet}',
@@ -1616,8 +1636,7 @@ sub create_links {
   my %xkeyref = ();
 
   # now get the account numbers
   my %xkeyref = ();
 
   # now get the account numbers
-  $query =
-    qq|SELECT c.accno, c.description, c.link, c.taxkey_id
+  $query = qq|SELECT c.accno, c.description, c.link, c.taxkey_id
               FROM chart c
              WHERE c.link LIKE '%$module%'
              ORDER BY c.accno|;
               FROM chart c
              WHERE c.link LIKE '%$module%'
              ORDER BY c.accno|;
@@ -1700,14 +1719,14 @@ sub create_links {
     $self->{exchangerate} =
       $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate},
                               $fld);
     $self->{exchangerate} =
       $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate},
                               $fld);
-    my $index=0;
+    my $index = 0;
 
     # store amounts in {acc_trans}{$key} for multiple accounts
     while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
       $ref->{exchangerate} =
         $self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate},
                                 $fld);
 
     # store amounts in {acc_trans}{$key} for multiple accounts
     while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
       $ref->{exchangerate} =
         $self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate},
                                 $fld);
-      if ( !($xkeyref{ $ref->{accno} } =~ /tax/)) {
+      if (!($xkeyref{ $ref->{accno} } =~ /tax/)) {
         $index++;
       }
       $ref->{index} = $index;
         $index++;
       }
       $ref->{index} = $index;
@@ -2143,7 +2162,6 @@ sub get_partsgroup {
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
 
-
 sub get_pricegroup {
   $main::lxdebug->enter_sub();
 
 sub get_pricegroup {
   $main::lxdebug->enter_sub();
 
@@ -2175,92 +2193,95 @@ sub get_pricegroup {
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
 
-
 sub audittrail {
   my ($self, $dbh, $myconfig, $audittrail) = @_;
 sub audittrail {
   my ($self, $dbh, $myconfig, $audittrail) = @_;
-  
-# table, $reference, $formname, $action, $id, $transdate) = @_;
+
+  # table, $reference, $formname, $action, $id, $transdate) = @_;
 
   my $query;
   my $rv;
   my $disconnect;
 
 
   my $query;
   my $rv;
   my $disconnect;
 
-  if (! $dbh) {
-    $dbh = $self->dbconnect($myconfig);
+  if (!$dbh) {
+    $dbh        = $self->dbconnect($myconfig);
     $disconnect = 1;
   }
     $disconnect = 1;
   }
-    
+
   # if we have an id add audittrail, otherwise get a new timestamp
   # if we have an id add audittrail, otherwise get a new timestamp
-  
+
   if ($audittrail->{id}) {
   if ($audittrail->{id}) {
-    
+
     $query = qq|SELECT audittrail FROM defaults|;
     $query = qq|SELECT audittrail FROM defaults|;
-    
+
     if ($dbh->selectrow_array($query)) {
       my ($null, $employee_id) = $self->get_employee($dbh);
 
       if ($self->{audittrail} && !$myconfig) {
     if ($dbh->selectrow_array($query)) {
       my ($null, $employee_id) = $self->get_employee($dbh);
 
       if ($self->{audittrail} && !$myconfig) {
-       chop $self->{audittrail};
-       
-       my @a = split /\|/, $self->{audittrail};
-       my %newtrail = ();
-       my $key;
-       my $i;
-       my @flds = qw(tablename reference formname action transdate);
-
-       # put into hash and remove dups
-       while (@a) {
-         $key = "$a[2]$a[3]";
-         $i = 0;
-         $newtrail{$key} = { map { $_ => $a[$i++] } @flds };
-         splice @a, 0, 5;
-       }
-       
-       $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
+        chop $self->{audittrail};
+
+        my @a = split /\|/, $self->{audittrail};
+        my %newtrail = ();
+        my $key;
+        my $i;
+        my @flds = qw(tablename reference formname action transdate);
+
+        # put into hash and remove dups
+        while (@a) {
+          $key = "$a[2]$a[3]";
+          $i   = 0;
+          $newtrail{$key} = { map { $_ => $a[$i++] } @flds };
+          splice @a, 0, 5;
+        }
+
+        $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
                    formname, action, employee_id, transdate)
                    VALUES ($audittrail->{id}, ?, ?,
                    ?, ?, $employee_id, ?)|;
                    formname, action, employee_id, transdate)
                    VALUES ($audittrail->{id}, ?, ?,
                    ?, ?, $employee_id, ?)|;
-       my $sth = $dbh->prepare($query) || $self->dberror($query);
-
-       foreach $key (sort { $newtrail{$a}{transdate} cmp $newtrail{$b}{transdate} } keys %newtrail) {
-         $i = 1;
-         for (@flds) { $sth->bind_param($i++, $newtrail{$key}{$_}) }
-
-         $sth->execute || $self->dberror;
-         $sth->finish;
-       }
+        my $sth = $dbh->prepare($query) || $self->dberror($query);
+
+        foreach $key (
+          sort {
+            $newtrail{$a}{transdate} cmp $newtrail{$b}{transdate}
+          } keys %newtrail
+          ) {
+          $i = 1;
+          for (@flds) { $sth->bind_param($i++, $newtrail{$key}{$_}) }
+
+          $sth->execute || $self->dberror;
+          $sth->finish;
+        }
       }
 
       }
 
-     
       if ($audittrail->{transdate}) {
       if ($audittrail->{transdate}) {
-       $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
+        $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
                    formname, action, employee_id, transdate) VALUES (
                    $audittrail->{id}, '$audittrail->{tablename}', |
                    formname, action, employee_id, transdate) VALUES (
                    $audittrail->{id}, '$audittrail->{tablename}', |
-                   .$dbh->quote($audittrail->{reference}).qq|,
+          . $dbh->quote($audittrail->{reference}) . qq|,
                    '$audittrail->{formname}', '$audittrail->{action}',
                    $employee_id, '$audittrail->{transdate}')|;
       } else {
                    '$audittrail->{formname}', '$audittrail->{action}',
                    $employee_id, '$audittrail->{transdate}')|;
       } else {
-       $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
+        $query = qq|INSERT INTO audittrail (trans_id, tablename, reference,
                    formname, action, employee_id) VALUES ($audittrail->{id},
                    '$audittrail->{tablename}', |
                    formname, action, employee_id) VALUES ($audittrail->{id},
                    '$audittrail->{tablename}', |
-                   .$dbh->quote($audittrail->{reference}).qq|,
+          . $dbh->quote($audittrail->{reference}) . qq|,
                    '$audittrail->{formname}', '$audittrail->{action}',
                    $employee_id)|;
       }
       $dbh->do($query);
     }
   } else {
                    '$audittrail->{formname}', '$audittrail->{action}',
                    $employee_id)|;
       }
       $dbh->do($query);
     }
   } else {
-    
+
     $query = qq|SELECT current_timestamp FROM defaults|;
     my ($timestamp) = $dbh->selectrow_array($query);
 
     $query = qq|SELECT current_timestamp FROM defaults|;
     my ($timestamp) = $dbh->selectrow_array($query);
 
-    $rv = "$audittrail->{tablename}|$audittrail->{reference}|$audittrail->{formname}|$audittrail->{action}|$timestamp|";
+    $rv =
+      "$audittrail->{tablename}|$audittrail->{reference}|$audittrail->{formname}|$audittrail->{action}|$timestamp|";
   }
 
   $dbh->disconnect if $disconnect;
   }
 
   $dbh->disconnect if $disconnect;
-  
+
   $rv;
   $rv;
-  
+
 }
 
 package Locale;
 }
 
 package Locale;
index 1cc3d34..d6723d3 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -283,9 +283,12 @@ sub all_transactions {
     $apwhere .= " AND c.gifi_accno = '$form->{gifi_accno}'";
   }
   if ($form->{category} ne 'X') {
     $apwhere .= " AND c.gifi_accno = '$form->{gifi_accno}'";
   }
   if ($form->{category} ne 'X') {
-    $glwhere .= " AND gl.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
-    $arwhere .= " AND ar.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
-    $apwhere .= " AND ap.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
+    $glwhere .=
+      " AND gl.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
+    $arwhere .=
+      " AND ar.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
+    $apwhere .=
+      " AND ap.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = '$form->{category}'))";
   }
 
   if ($form->{accno}) {
   }
 
   if ($form->{accno}) {
@@ -344,19 +347,20 @@ sub all_transactions {
 
   my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE: q|'0'|;
 
 
   my $false = ($myconfig->{dbdriver} eq 'Pg') ? FALSE: q|'0'|;
 
-     my $sortorder = join ', ', $form->sort_columns(qw(transdate reference source description accno));
-     my %ordinal = ( transdate => 6,
-                     reference => 4,
-                     source => 7,
-                 description => 5 );
-     map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
-   
-     if ($form->{sort}) {
-         $sortorder = $form->{sort} . ",";
-     } else {
-        $sortorder = "";
-      }
-  
+  my $sortorder = join ', ',
+    $form->sort_columns(qw(transdate reference source description accno));
+  my %ordinal = (transdate   => 6,
+                 reference   => 4,
+                 source      => 7,
+                 description => 5);
+  map { $sortorder =~ s/$_/$ordinal{$_}/ } keys %ordinal;
+
+  if ($form->{sort}) {
+    $sortorder = $form->{sort} . ",";
+  } else {
+    $sortorder = "";
+  }
+
   my $query =
     qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, t.taxkey AS sorttax,
                  g.description, ac.transdate, ac.source, ac.trans_id,
   my $query =
     qq|SELECT g.id, 'gl' AS type, $false AS invoice, g.reference, ac.taxkey, t.taxkey AS sorttax,
                  g.description, ac.transdate, ac.source, ac.trans_id,
@@ -389,7 +393,7 @@ sub all_transactions {
                 ORDER BY $sortorder transdate, trans_id, taxkey DESC, sorttax DESC,oid|;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
                 ORDER BY $sortorder transdate, trans_id, taxkey DESC, sorttax DESC,oid|;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
-  my $trans_id = "";
+  my $trans_id  = "";
   my $trans_id2 = "";
   while (my $ref0 = $sth->fetchrow_hashref(NAME_lc)) {
     $trans_id = $ref0->{id};
   my $trans_id2 = "";
   while (my $ref0 = $sth->fetchrow_hashref(NAME_lc)) {
     $trans_id = $ref0->{id};
@@ -398,13 +402,14 @@ sub all_transactions {
         push @{ $form->{GL} }, $ref;
         $balance = 0;
       }
         push @{ $form->{GL} }, $ref;
         $balance = 0;
       }
-      $ref = $ref0;
+      $ref       = $ref0;
       $trans_id2 = $ref->{id};
       $trans_id2 = $ref->{id};
-      
+
       # gl
       if ($ref->{type} eq "gl") {
         $ref->{module} = "gl";
       }
       # gl
       if ($ref->{type} eq "gl") {
         $ref->{module} = "gl";
       }
+
       # ap
       if ($ref->{type} eq "ap") {
         if ($ref->{invoice}) {
       # ap
       if ($ref->{type} eq "ap") {
         if ($ref->{invoice}) {
@@ -413,7 +418,7 @@ sub all_transactions {
           $ref->{module} = "ap";
         }
       }
           $ref->{module} = "ap";
         }
       }
-  
+
       # ar
       if ($ref->{type} eq "ar") {
         if ($ref->{invoice}) {
       # ar
       if ($ref->{type} eq "ar") {
         if ($ref->{invoice}) {
@@ -447,55 +452,56 @@ sub all_transactions {
         }
       }
     } else {
         }
       }
     } else {
-      $ref2 = $ref0;
+      $ref2      = $ref0;
       $trans_id2 = $ref2->{id};
       $trans_id2 = $ref2->{id};
-#      if ($form->{accno} eq ''){ # flo & udo: if general report,
-                                  # then check balance
-#         while (abs($balance) >= 0.015) {
-#           my $ref2 = $sth->fetchrow_hashref(NAME_lc)
-#             || $form->error("Unbalanced ledger!");
-#     
-          $balance =
-            (int($balance * 100000) + int(100000 * $ref2->{amount})) / 100000;
-          if ($ref2->{amount} < 0) {
-            if ($ref2->{chart_id} > 0) {
-              if ($ref->{debit_tax_accno}{$i} ne "") {
-                $i++;
-              }
-              $ref->{debit_tax}{$i}       = $ref2->{amount} * -1;
-              $ref->{debit_tax_accno}{$i} = $ref2->{accno};
-            } else {
-              if ($ref->{debit_accno}{$k} ne "") {
-                $k++;
-              }
-              $ref->{debit}{$k}        = $ref2->{amount} * -1;
-              $ref->{debit_accno}{$k}  = $ref2->{accno};
-              $ref->{debit_taxkey}{$k} = $ref2->{taxkey};
-            }
-          } else {
-            if ($ref2->{chart_id} > 0) {
-              if ($ref->{credit_tax_accno}{$j} ne "") {
-                $j++;
-              }
-              $ref->{credit_tax}{$j}       = $ref2->{amount};
-              $ref->{credit_tax_accno}{$j} = $ref2->{accno};
-            } else {
-              if ($ref->{credit_accno}{$l} ne "") {
-                $l++;
-              }
-              $ref->{credit}{$l}        = $ref2->{amount};
-              $ref->{credit_accno}{$l}  = $ref2->{accno};
-              $ref->{credit_taxkey}{$l} = $ref2->{taxkey};
-            }
+
+      #      if ($form->{accno} eq ''){ # flo & udo: if general report,
+      # then check balance
+      #         while (abs($balance) >= 0.015) {
+      #           my $ref2 = $sth->fetchrow_hashref(NAME_lc)
+      #             || $form->error("Unbalanced ledger!");
+      #
+      $balance =
+        (int($balance * 100000) + int(100000 * $ref2->{amount})) / 100000;
+      if ($ref2->{amount} < 0) {
+        if ($ref2->{chart_id} > 0) {
+          if ($ref->{debit_tax_accno}{$i} ne "") {
+            $i++;
           }
           }
-#         }
-#       } else {
-#         # if account-report, then calculate the Balance?!
-#         # ToDo: Calculate the Balance
-#         1;
-#       }
+          $ref->{debit_tax}{$i}       = $ref2->{amount} * -1;
+          $ref->{debit_tax_accno}{$i} = $ref2->{accno};
+        } else {
+          if ($ref->{debit_accno}{$k} ne "") {
+            $k++;
+          }
+          $ref->{debit}{$k}        = $ref2->{amount} * -1;
+          $ref->{debit_accno}{$k}  = $ref2->{accno};
+          $ref->{debit_taxkey}{$k} = $ref2->{taxkey};
+        }
+      } else {
+        if ($ref2->{chart_id} > 0) {
+          if ($ref->{credit_tax_accno}{$j} ne "") {
+            $j++;
+          }
+          $ref->{credit_tax}{$j}       = $ref2->{amount};
+          $ref->{credit_tax_accno}{$j} = $ref2->{accno};
+        } else {
+          if ($ref->{credit_accno}{$l} ne "") {
+            $l++;
+          }
+          $ref->{credit}{$l}        = $ref2->{amount};
+          $ref->{credit_accno}{$l}  = $ref2->{accno};
+          $ref->{credit_taxkey}{$l} = $ref2->{taxkey};
+        }
+      }
+
+      #         }
+      #       } else {
+      #         # if account-report, then calculate the Balance?!
+      #         # ToDo: Calculate the Balance
+      #         1;
+      #       }
     }
     }
-       
 
   }
   push @{ $form->{GL} }, $ref;
 
   }
   push @{ $form->{GL} }, $ref;
index fd8a230..eaa5e88 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -34,6 +34,7 @@
 
 package IC;
 use Data::Dumper;
 
 package IC;
 use Data::Dumper;
+
 sub get_part {
   $main::lxdebug->enter_sub();
 
 sub get_part {
   $main::lxdebug->enter_sub();
 
@@ -235,8 +236,8 @@ sub get_pricegroups {
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $form) = @_;
   $main::lxdebug->enter_sub();
 
   my ($self, $myconfig, $form) = @_;
-  my $dbh = $form->dbconnect($myconfig);
-  my $i = 1;
+  my $dbh                  = $form->dbconnect($myconfig);
+  my $i                    = 1;
   my @pricegroups_not_used = ();
 
   # get pricegroups
   my @pricegroups_not_used = ();
 
   # get pricegroups
@@ -276,7 +277,6 @@ sub get_pricegroups {
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
 
-
 sub save {
   $main::lxdebug->enter_sub();
 
 sub save {
   $main::lxdebug->enter_sub();
 
@@ -456,11 +456,14 @@ sub save {
   # insert price records only if different to sellprice
   for my $i (1 .. $form->{price_rows}) {
     if ($form->{"price_$i"} eq "0") {
   # insert price records only if different to sellprice
   for my $i (1 .. $form->{price_rows}) {
     if ($form->{"price_$i"} eq "0") {
-       $form->{"price_$i"} = $form->{sellprice};
+      $form->{"price_$i"} = $form->{sellprice};
     }
     }
-    if ((   $form->{"price_$i"} 
-        || $form->{"klass_$i"}
-        || $form->{"pricegroup_id_$i"}) and $form->{"price_$i"} != $form->{sellprice}) {
+    if (
+        (   $form->{"price_$i"}
+         || $form->{"klass_$i"}
+         || $form->{"pricegroup_id_$i"})
+        and $form->{"price_$i"} != $form->{sellprice}
+      ) {
       $klass = $form->parse_amount($myconfig, $form->{"klass_$i"});
       $price = $form->parse_amount($myconfig, $form->{"price_$i"});
       $pricegroup_id =
       $klass = $form->parse_amount($myconfig, $form->{"klass_$i"});
       $price = $form->parse_amount($myconfig, $form->{"price_$i"});
       $pricegroup_id =
@@ -1041,7 +1044,8 @@ sub all_parts {
         $ordwhere .= " AND lower(oi.description) LIKE '$var'";
       }
 
         $ordwhere .= " AND lower(oi.description) LIKE '$var'";
       }
 
-      $flds = qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
+      $flds =
+        qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
                  oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
                 p.listprice, p.lastcost, p.rop, p.weight,
                 p.priceupdate, p.image, p.drawing, p.microfiche,
                  oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
                 p.listprice, p.lastcost, p.rop, p.weight,
                 p.priceupdate, p.image, p.drawing, p.microfiche,
@@ -1067,7 +1071,8 @@ sub all_parts {
       }
 
       if ($form->{onorder}) {
       }
 
       if ($form->{onorder}) {
-        $flds = qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
+        $flds =
+          qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
                    oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
                   p.listprice, p.lastcost, p.rop, p.weight,
                   p.priceupdate, p.image, p.drawing, p.microfiche,
                    oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
                   p.listprice, p.lastcost, p.rop, p.weight,
                   p.priceupdate, p.image, p.drawing, p.microfiche,
@@ -1104,7 +1109,8 @@ sub all_parts {
         $quowhere .= " AND lower(oi.description) LIKE '$var'";
       }
 
         $quowhere .= " AND lower(oi.description) LIKE '$var'";
       }
 
-      $flds = qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
+      $flds =
+        qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
                  oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
                 p.listprice, p.lastcost, p.rop, p.weight,
                 p.priceupdate, p.image, p.drawing, p.microfiche,
                  oi.qty AS onhand, oi.unit, p.bin, oi.sellprice,
                 p.listprice, p.lastcost, p.rop, p.weight,
                 p.priceupdate, p.image, p.drawing, p.microfiche,
@@ -1130,7 +1136,8 @@ sub all_parts {
       }
 
       if ($form->{rfq}) {
       }
 
       if ($form->{rfq}) {
-        $flds = qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
+        $flds =
+          qq|p.id, p.partnumber, oi.description, oi.serialnumber AS serialnumber,
                    oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
                   p.listprice, p.lastcost, p.rop, p.weight,
                   p.priceupdate, p.image, p.drawing, p.microfiche,
                    oi.qty * -1 AS onhand, oi.unit, p.bin, oi.sellprice,
                   p.listprice, p.lastcost, p.rop, p.weight,
                   p.priceupdate, p.image, p.drawing, p.microfiche,
index 04144ff..d4d8c6f 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -106,10 +106,10 @@ sub invoice_details {
       push(@{ $form->{description} },   qq|$form->{"description_$i"}|);
       push(@{ $form->{qty} },
            $form->format_amount($myconfig, $form->{"qty_$i"}));
       push(@{ $form->{description} },   qq|$form->{"description_$i"}|);
       push(@{ $form->{qty} },
            $form->format_amount($myconfig, $form->{"qty_$i"}));
-      push(@{ $form->{unit} },         qq|$form->{"unit_$i"}|);
+      push(@{ $form->{unit} },            qq|$form->{"unit_$i"}|);
       push(@{ $form->{deliverydate_oe} }, qq|$form->{"deliverydate_$i"}|);
 
       push(@{ $form->{deliverydate_oe} }, qq|$form->{"deliverydate_$i"}|);
 
-      push(@{ $form->{sellprice} }, $form->{"sellprice_$i"});
+      push(@{ $form->{sellprice} },    $form->{"sellprice_$i"});
       push(@{ $form->{ordnumber_oe} }, qq|$form->{"ordnumber_$i"}|);
       push(@{ $form->{transdate_oe} }, qq|$form->{"transdate_$i"}|);
 
       push(@{ $form->{ordnumber_oe} }, qq|$form->{"ordnumber_$i"}|);
       push(@{ $form->{transdate_oe} }, qq|$form->{"transdate_$i"}|);
 
@@ -139,10 +139,14 @@ sub invoice_details {
       $dec = length $dec;
       my $decimalplaces = ($dec > 2) ? $dec : 2;
 
       $dec = length $dec;
       my $decimalplaces = ($dec > 2) ? $dec : 2;
 
-      my $i_discount = $form->round_amount($sellprice * 
-                                           $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100, $decimalplaces);
+      my $i_discount =
+        $form->round_amount(
+                            $sellprice * $form->parse_amount($myconfig,
+                                                 $form->{"discount_$i"}) / 100,
+                            $decimalplaces);
 
 
-      my $discount = $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
+      my $discount =
+        $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
 
       # keep a netprice as well, (sellprice - discount)
       $form->{"netprice_$i"} = $sellprice - $i_discount;
 
       # keep a netprice as well, (sellprice - discount)
       $form->{"netprice_$i"} = $sellprice - $i_discount;
@@ -164,7 +168,7 @@ sub invoice_details {
         : " ";
       $linetotal = ($linetotal != 0) ? $linetotal : " ";
 
         : " ";
       $linetotal = ($linetotal != 0) ? $linetotal : " ";
 
-      push(@{ $form->{discount} }, $discount);
+      push(@{ $form->{discount} },   $discount);
       push(@{ $form->{p_discount} }, $form->{"discount_$i"});
 
       $form->{total} += $linetotal;
       push(@{ $form->{p_discount} }, $form->{"discount_$i"});
 
       $form->{total} += $linetotal;
@@ -803,9 +807,10 @@ sub post_invoice {
   # set values which could be empty to 0
   $form->{terms}       *= 1;
   $form->{taxincluded} *= 1;
   # set values which could be empty to 0
   $form->{terms}       *= 1;
   $form->{taxincluded} *= 1;
-  my $datepaid     = ($form->{paid})         ? qq|'$form->{datepaid}'| : "NULL";
-  my $duedate      = ($form->{duedate})      ? qq|'$form->{duedate}'|  : "NULL";
-  my $deliverydate = ($form->{deliverydate}) ? qq|'$form->{deliverydate}'| : "NULL";
+  my $datepaid = ($form->{paid})    ? qq|'$form->{datepaid}'| : "NULL";
+  my $duedate  = ($form->{duedate}) ? qq|'$form->{duedate}'|  : "NULL";
+  my $deliverydate =
+    ($form->{deliverydate}) ? qq|'$form->{deliverydate}'| : "NULL";
 
   # fill in subject if there is none
   $form->{subject} = qq|$form->{label} $form->{invnumber}|
 
   # fill in subject if there is none
   $form->{subject} = qq|$form->{label} $form->{invnumber}|
index c3a5a64..8a9619c 100644 (file)
@@ -1,7 +1,7 @@
 package LXDebug;
 
 package LXDebug;
 
-use constant NONE => 0;
-use constant INFO => 1;
+use constant NONE   => 0;
+use constant INFO   => 1;
 use constant DEBUG1 => 2;
 use constant DEBUG2 => 3;
 
 use constant DEBUG1 => 2;
 use constant DEBUG2 => 3;
 
index 4662f50..fb7153c 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -223,7 +223,8 @@ sub save {
   for my $i (1 .. $form->{rowcount}) {
 
     map {
   for my $i (1 .. $form->{rowcount}) {
 
     map {
-      $form->{"${_}_$i"} = $form->parse_amount($myconfig, $form->{"${_}_$i"})
+      $form->{"${_}_$i"} =
+        $form->parse_amount($myconfig, $form->{"${_}_$i"})
     } qw(qty ship);
 
     if ($form->{"qty_$i"}) {
     } qw(qty ship);
 
     if ($form->{"qty_$i"}) {
@@ -460,18 +461,19 @@ Message: $form->{message}\r| if $form->{message};
   return $rc;
 }
 
   return $rc;
 }
 
-# this function closes multiple orders given in $form->{ordnumber_#}. 
+# this function closes multiple orders given in $form->{ordnumber_#}.
 # use this for multiple orders that don't have to be saved back
 # single orders should use OE::save instead.
 sub close_orders {
   $main::lxdebug->enter_sub();
 
 # use this for multiple orders that don't have to be saved back
 # single orders should use OE::save instead.
 sub close_orders {
   $main::lxdebug->enter_sub();
 
-  my ($self, $myconfig ,$form) = @_;
+  my ($self, $myconfig$form) = @_;
 
   for my $i (1 .. $form->{rowcount}) {
 
     map {
 
   for my $i (1 .. $form->{rowcount}) {
 
     map {
-      $form->{"${_}_$i"} = $form->parse_amount($myconfig, $form->{"${_}_$i"})
+      $form->{"${_}_$i"} =
+        $form->parse_amount($myconfig, $form->{"${_}_$i"})
     } qw(qty ship);
     if ($delete_oe_id) {
       $form->{"orderitems_id_$i"} = "";
     } qw(qty ship);
     if ($delete_oe_id) {
       $form->{"orderitems_id_$i"} = "";
@@ -487,13 +489,16 @@ sub close_orders {
         $form->parse_amount($myconfig, $form->{"sellprice_$i"});
     }
   }
         $form->parse_amount($myconfig, $form->{"sellprice_$i"});
     }
   }
+
   # get ids from $form
   # get ids from $form
-  map { push @ids, $form->{"ordnumber_$_"} if $form->{"ordnumber_$_"} } (1 .. $form->{rowcount});
-  
+  map { push @ids, $form->{"ordnumber_$_"} if $form->{"ordnumber_$_"} }
+    (1 .. $form->{rowcount});
+
   my $dbh = $form->dbconnect($myconfig);
   $query = qq|UPDATE oe SET
               closed = TRUE
   my $dbh = $form->dbconnect($myconfig);
   $query = qq|UPDATE oe SET
               closed = TRUE
-              WHERE ordnumber IN (|.join(', ', map{ $dbh->quote($_) }@ids).qq|)|;
+              WHERE ordnumber IN (|
+    . join(', ', map { $dbh->quote($_) } @ids) . qq|)|;
   $dbh->do($query) || $form->dberror($query);
   $dbh->disconnect;
 
   $dbh->do($query) || $form->dberror($query);
   $dbh->disconnect;
 
@@ -581,9 +586,12 @@ sub retrieve {
   my $query, @ids;
 
   # translate the ids (given by id_# and trans_id_#) into one array of ids, so we can join them later
   my $query, @ids;
 
   # translate the ids (given by id_# and trans_id_#) into one array of ids, so we can join them later
-  map { push @ids, $form->{"trans_id_$_"} if ($form->{"id_$_"} and $form->{"trans_id_$_"}) } (1 .. $form->{"rowcount"});
+  map {
+    push @ids, $form->{"trans_id_$_"}
+      if ($form->{"id_$_"} and $form->{"trans_id_$_"})
+  } (1 .. $form->{"rowcount"});
 
 
-  # if called in multi id mode, and still only got one id, switch back to single id 
+  # if called in multi id mode, and still only got one id, switch back to single id
   if ($form->{"rowcount"} and $#ids == 0) {
     $form->{"id"} = $ids[0];
     undef @ids;
   if ($form->{"rowcount"} and $#ids == 0) {
     $form->{"id"} = $ids[0];
     undef @ids;
@@ -628,15 +636,17 @@ sub retrieve {
 
   ($form->{currency}) = split /:/, $form->{currencies};
 
 
   ($form->{currency}) = split /:/, $form->{currencies};
 
-  # set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure 
+  # set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure
   # we come from invoices, feel free.
   # we come from invoices, feel free.
-  $form->{reqdate} = $form->{deliverydate} if ($form->{deliverydate} and $form->{callback} =~ /action=ar_transactions/);
+  $form->{reqdate} = $form->{deliverydate}
+    if (    $form->{deliverydate}
+        and $form->{callback} =~ /action=ar_transactions/);
 
   if ($form->{id} or @ids) {
 
     # retrieve order for single id
     # NOTE: this query is intended to fetch all information only ONCE.
 
   if ($form->{id} or @ids) {
 
     # retrieve order for single id
     # NOTE: this query is intended to fetch all information only ONCE.
-    # so if any of these infos is important (or even different) for any item, 
+    # so if any of these infos is important (or even different) for any item,
     # it will be killed out and then has to be fetched from the item scope query further down
     $query = qq|SELECT o.cp_id, o.ordnumber, o.transdate, o.reqdate,
                 o.taxincluded, o.shippingpoint, o.shipvia, o.notes, o.intnotes,
     # it will be killed out and then has to be fetched from the item scope query further down
     $query = qq|SELECT o.cp_id, o.ordnumber, o.transdate, o.reqdate,
                 o.taxincluded, o.shippingpoint, o.shipvia, o.notes, o.intnotes,
@@ -648,12 +658,12 @@ sub retrieve {
                JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id)
                LEFT JOIN employee e ON (o.employee_id = e.id)
                LEFT JOIN department d ON (o.department_id = d.id)
                JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id)
                LEFT JOIN employee e ON (o.employee_id = e.id)
                LEFT JOIN department d ON (o.department_id = d.id)
-               |. ($form->{id} 
-                  ? qq|WHERE o.id = $form->{id}| 
-                   : qq|WHERE o.id IN (|.join(', ', @ids).qq|)|
-                  );
+               |
+      . ($form->{id}
+         ? qq|WHERE o.id = $form->{id}|
+         : qq|WHERE o.id IN (| . join(', ', @ids) . qq|)|);
 
 
-#$main::lxdebug->message(0, $query);
+    #$main::lxdebug->message(0, $query);
 
     $sth = $dbh->prepare($query);
     $sth->execute || $form->dberror($query);
 
     $sth = $dbh->prepare($query);
     $sth->execute || $form->dberror($query);
@@ -667,11 +677,12 @@ sub retrieve {
     }
 
     # if not given, fill transdate with current_date
     }
 
     # if not given, fill transdate with current_date
-    $form->{transdate} = $form->current_date($myconfig) unless $form->{transdate};
+    $form->{transdate} = $form->current_date($myconfig)
+      unless $form->{transdate};
 
     $sth->finish;
 
 
     $sth->finish;
 
-    # shipto and pinted/mailed/queued status makes only sense for single id retrieve 
+    # shipto and pinted/mailed/queued status makes only sense for single id retrieve
     if (!@ids) {
       $query = qq|SELECT s.* FROM shipto s
                   WHERE s.trans_id = $form->{id}|;
     if (!@ids) {
       $query = qq|SELECT s.* FROM shipto s
                   WHERE s.trans_id = $form->{id}|;
@@ -692,11 +703,12 @@ sub retrieve {
       while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
         $form->{printed} .= "$ref->{formname} " if $ref->{printed};
         $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
       while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
         $form->{printed} .= "$ref->{formname} " if $ref->{printed};
         $form->{emailed} .= "$ref->{formname} " if $ref->{emailed};
-        $form->{queued} .= "$ref->{formname} $ref->{spoolfile} " if $ref->{spoolfile};
+        $form->{queued} .= "$ref->{formname} $ref->{spoolfile} "
+          if $ref->{spoolfile};
       }
       $sth->finish;
       map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
       }
       $sth->finish;
       map { $form->{$_} =~ s/ +$//g } qw(printed emailed queued);
-    } # if !@ids
+    }    # if !@ids
 
     my %oid = ('Pg'     => 'oid',
                'Oracle' => 'rowid');
 
     my %oid = ('Pg'     => 'oid',
                'Oracle' => 'rowid');
@@ -723,24 +735,25 @@ sub retrieve {
                LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
                LEFT JOIN project pr ON (o.project_id = pr.id)
                LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
                LEFT JOIN chart c3 ON (p.expense_accno_id = c3.id)
                LEFT JOIN project pr ON (o.project_id = pr.id)
                LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
-               |. ($form->{id} 
-                  ? qq|WHERE o.trans_id = $form->{id}| 
-                  : qq|WHERE o.trans_id IN (|.join(", ", @ids).qq|)| 
-                  ).qq|
+               |
+      . ($form->{id}
+         ? qq|WHERE o.trans_id = $form->{id}|
+         : qq|WHERE o.trans_id IN (| . join(", ", @ids) . qq|)|)
+      . qq|
                 ORDER BY o.$oid{$myconfig->{dbdriver}}|;
                 ORDER BY o.$oid{$myconfig->{dbdriver}}|;
-    
+
     $sth = $dbh->prepare($query);
     $sth->execute || $form->dberror($query);
 
     while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
     $sth = $dbh->prepare($query);
     $sth->execute || $form->dberror($query);
 
     while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
-     
+
       # in collective order, copy global ordnumber, transdate, cusordnumber into item scope
       # in collective order, copy global ordnumber, transdate, cusordnumber into item scope
-      #   unless already present there 
+      #   unless already present there
       # remove _oe entries afterwards
       map { $ref->{$_} = $ref->{"${_}_oe"} if ($ref->{$_} eq '') }
       # remove _oe entries afterwards
       map { $ref->{$_} = $ref->{"${_}_oe"} if ($ref->{$_} eq '') }
-        qw|ordnumber transdate cusordnumber| if (@ids);
-      map{ delete $ref->{$_} } 
-        qw|ordnumber_oe transdate_oe cusordnumber_oe|;
+        qw|ordnumber transdate cusordnumber|
+        if (@ids);
+      map { delete $ref->{$_} } qw|ordnumber_oe transdate_oe cusordnumber_oe|;
 
       #set expense_accno=inventory_accno if they are different => bilanz
       $vendor_accno =
 
       #set expense_accno=inventory_accno if they are different => bilanz
       $vendor_accno =
@@ -891,10 +904,14 @@ sub order_details {
       $dec = length $dec;
       my $decimalplaces = ($dec > 2) ? $dec : 2;
 
       $dec = length $dec;
       my $decimalplaces = ($dec > 2) ? $dec : 2;
 
-      my $i_discount = $form->round_amount($sellprice *
-                                           $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100, $decimalplaces);
+      my $i_discount =
+        $form->round_amount(
+                            $sellprice * $form->parse_amount($myconfig,
+                                                 $form->{"discount_$i"}) / 100,
+                            $decimalplaces);
 
 
-      my $discount = $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
+      my $discount =
+        $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
 
       # keep a netprice as well, (sellprice - discount)
       #$form->{"netprice_$i"} = $sellprice - $discount;
 
       # keep a netprice as well, (sellprice - discount)
       #$form->{"netprice_$i"} = $sellprice - $discount;
@@ -917,7 +934,7 @@ sub order_details {
         : " ";
       $linetotal = ($linetotal != 0) ? $linetotal : " ";
 
         : " ";
       $linetotal = ($linetotal != 0) ? $linetotal : " ";
 
-      push(@{ $form->{discount} }, $discount);
+      push(@{ $form->{discount} },   $discount);
       push(@{ $form->{p_discount} }, $form->{"discount_$i"});
 
       $form->{ordtotal} += $linetotal;
       push(@{ $form->{p_discount} }, $form->{"discount_$i"});
 
       $form->{ordtotal} += $linetotal;
@@ -949,7 +966,7 @@ sub order_details {
         }
       }
 
         }
       }
 
-      $tax_rate = $taxrate*100;
+      $tax_rate = $taxrate * 100;
       push(@{ $form->{tax_rate} }, qq|$tax_rate|);
 
       if ($form->{"assembly_$i"}) {
       push(@{ $form->{tax_rate} }, qq|$tax_rate|);
 
       if ($form->{"assembly_$i"}) {
index 4ccabce..89e8135 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -34,7 +34,6 @@
 
 package RP;
 
 
 package RP;
 
-
 sub balance_sheet {
   $main::lxdebug->enter_sub();
 
 sub balance_sheet {
   $main::lxdebug->enter_sub();
 
@@ -1134,6 +1133,7 @@ sub get_accounts_g {
   my @accno;
   my $accno;
   my $ref;
   my @accno;
   my $accno;
   my $ref;
+
   #print $query;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
   #print $query;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
@@ -2045,8 +2045,8 @@ sub payments {
 
   my $sortorder = join ', ',
     $form->sort_columns(qw(name invnumber ordnumber transdate source));
 
   my $sortorder = join ', ',
     $form->sort_columns(qw(name invnumber ordnumber transdate source));
-    $sortorder = $form->{sort} if $form->{sort};
-    
+  $sortorder = $form->{sort} if $form->{sort};
+
   # cycle through each id
   foreach my $accno (split(/ /, $form->{paymentaccounts})) {
 
   # cycle through each id
   foreach my $accno (split(/ /, $form->{paymentaccounts})) {
 
@@ -2143,14 +2143,15 @@ sub bwa {
     $form->{ "$key" . "gesamtleistung" } = 0;
     $form->{ "$key" . "gesamtkosten" }   = 0;
 
     $form->{ "$key" . "gesamtleistung" } = 0;
     $form->{ "$key" . "gesamtkosten" }   = 0;
 
-
     foreach $category (@categories) {
 
       if (defined($form->{$category}{$key})) {
         $form->{"$key$category"} =
           $form->format_amount($myconfig,
                                $form->round_amount($form->{$category}{$key}, 2
     foreach $category (@categories) {
 
       if (defined($form->{$category}{$key})) {
         $form->{"$key$category"} =
           $form->format_amount($myconfig,
                                $form->round_amount($form->{$category}{$key}, 2
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
       }
     }
     foreach $item (@gesamtleistung) {
       }
     }
     foreach $item (@gesamtleistung) {
@@ -2173,7 +2174,7 @@ sub bwa {
     $form->{ "$key" . "ergebnisvorsteuern" } =
       $form->{ "$key" . "betriebsergebnis" } -
       $form->{ "$key" . "neutraleraufwand" } +
     $form->{ "$key" . "ergebnisvorsteuern" } =
       $form->{ "$key" . "betriebsergebnis" } -
       $form->{ "$key" . "neutraleraufwand" } +
-       $form->{ "$key" . "neutralertrag" };
+      $form->{ "$key" . "neutralertrag" };
     $form->{ "$key" . "ergebnis" } =
       $form->{ "$key" . "ergebnisvorsteuern" } + $form->{35}{$key};
 
     $form->{ "$key" . "ergebnis" } =
       $form->{ "$key" . "ergebnisvorsteuern" } + $form->{35}{$key};
 
@@ -2188,7 +2189,9 @@ sub bwa {
                                     $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
                                  $form->{decimalplaces}
                                     $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
                                  $form->{decimalplaces}
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
         }
       }
       foreach $item (@ergebnisse) {
         }
       }
       foreach $item (@ergebnisse) {
@@ -2199,7 +2202,9 @@ sub bwa {
                                      $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
                                  $form->{decimalplaces}
                                      $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
                                  $form->{decimalplaces}
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
       }
     }
 
       }
     }
 
@@ -2213,7 +2218,9 @@ sub bwa {
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
                                    $form->{decimalplaces}
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
                                    $form->{decimalplaces}
-                                 ), $form->{decimalplaces}, '0');
+                                 ),
+                                 $form->{decimalplaces},
+                                 '0');
         }
       }
       foreach $item (@ergebnisse) {
         }
       }
       foreach $item (@ergebnisse) {
@@ -2224,7 +2231,9 @@ sub bwa {
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
                                    $form->{decimalplaces}
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
                                    $form->{decimalplaces}
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
       }
     }
 
       }
     }
 
@@ -2233,11 +2242,13 @@ sub bwa {
         if (defined($form->{$category}{$key})) {
           $form->{ "$key" . "pk" . "$category" } =
             $form->format_amount(
         if (defined($form->{$category}{$key})) {
           $form->{ "$key" . "pk" . "$category" } =
             $form->format_amount(
-                      $myconfig,
-                      $form->round_amount(
-                        ($form->{$category}{$key} / $form->{10}{$key} * 100), 
-                        $form->{decimalplaces}
-                      ), $form->{decimalplaces}, '0');
+                        $myconfig,
+                        $form->round_amount(
+                          ($form->{$category}{$key} / $form->{10}{$key} * 100),
+                          $form->{decimalplaces}
+                        ),
+                        $form->{decimalplaces},
+                        '0');
         }
       }
       foreach $item (@ergebnisse) {
         }
       }
       foreach $item (@ergebnisse) {
@@ -2248,7 +2259,9 @@ sub bwa {
                                                    $form->{10}{$key} * 100
                                                 ),
                                                 $form->{decimalplaces}
                                                    $form->{10}{$key} * 100
                                                 ),
                                                 $form->{decimalplaces}
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
       }
     }
 
       }
     }
 
@@ -2257,11 +2270,13 @@ sub bwa {
         if (defined($form->{$category}{$key})) {
           $form->{ "$key" . "auf" . "$category" } =
             $form->format_amount(
         if (defined($form->{$category}{$key})) {
           $form->{ "$key" . "auf" . "$category" } =
             $form->format_amount(
-                       $myconfig,
-                       $form->round_amount(
-                         ($form->{$category}{$key} / $form->{4}{$key} * 100), 
-                         $form->{decimalplaces}
-                       ), $form->{decimalplaces}, '0');
+                         $myconfig,
+                         $form->round_amount(
+                           ($form->{$category}{$key} / $form->{4}{$key} * 100),
+                           $form->{decimalplaces}
+                         ),
+                         $form->{decimalplaces},
+                         '0');
         }
       }
       foreach $item (@ergebnisse) {
         }
       }
       foreach $item (@ergebnisse) {
@@ -2272,16 +2287,20 @@ sub bwa {
                                                    $form->{4}{$key} * 100
                                                 ),
                                                 $form->{decimalplaces}
                                                    $form->{4}{$key} * 100
                                                 ),
                                                 $form->{decimalplaces}
-                               ), $form->{decimalplaces}, '0');
+                               ),
+                               $form->{decimalplaces},
+                               '0');
       }
     }
 
     foreach $item (@ergebnisse) {
       $form->{ "$key" . "$item" } =
         $form->format_amount($myconfig,
       }
     }
 
     foreach $item (@ergebnisse) {
       $form->{ "$key" . "$item" } =
         $form->format_amount($myconfig,
-                             $form->round_amount($form->{ "$key" . "$item" }, 
-                             $form->{decimalplaces}
-                             ), $form->{decimalplaces}, '0');
+                             $form->round_amount($form->{ "$key" . "$item" },
+                                                 $form->{decimalplaces}
+                             ),
+                             $form->{decimalplaces},
+                             '0');
     }
 
   }
     }
 
   }
@@ -2301,7 +2320,7 @@ sub ustva {
   my $last_period     = 0;
   my $category        = "pos_ustva";
   my @categories_cent = qw(51r 511 86r 861 97r 971 93r 931
   my $last_period     = 0;
   my $category        = "pos_ustva";
   my @categories_cent = qw(51r 511 86r 861 97r 971 93r 931
-                           96 66 43 45 53 62 65 67);
+    96 66 43 45 53 62 65 67);
   my @categories_euro = qw(48 51 86 91 97 93 94);
   $form->{decimalplaces} *= 1;
 
   my @categories_euro = qw(48 51 86 91 97 93 94);
   $form->{decimalplaces} *= 1;
 
@@ -2339,7 +2358,7 @@ sub ustva {
   #   }
   #
   #    }
   #   }
   #
   #    }
-  
+
   #
   # Berechnung der USTVA Formularfelder
   #
   #
   # Berechnung der USTVA Formularfelder
   #
@@ -2347,8 +2366,9 @@ sub ustva {
   $form->{"86r"} = $form->{"861"};
   $form->{"97r"} = $form->{"971"};
   $form->{"93r"} = $form->{"931"};
   $form->{"86r"} = $form->{"861"};
   $form->{"97r"} = $form->{"971"};
   $form->{"93r"} = $form->{"931"};
+
   #$form->{"96"}  = $form->{"94"} * 0.16;
   #$form->{"96"}  = $form->{"94"} * 0.16;
-  $form->{"43"}  =
+  $form->{"43"} =
     $form->{"51r"} + $form->{"86r"} + $form->{"97r"} + $form->{"93r"} +
     $form->{"96"};
   $form->{"45"} = $form->{"43"};
     $form->{"51r"} + $form->{"86r"} + $form->{"97r"} + $form->{"93r"} +
     $form->{"96"};
   $form->{"45"} = $form->{"43"};
@@ -2359,12 +2379,14 @@ sub ustva {
 
   foreach $item (@categories_cent) {
     $form->{$item} =
 
   foreach $item (@categories_cent) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2), 2, '0');
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),
+                           2, '0');
   }
 
   foreach $item (@categories_euro) {
     $form->{$item} =
   }
 
   foreach $item (@categories_euro) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0), 0, '0');
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0),
+                           0, '0');
   }
 
   $dbh->disconnect;
   }
 
   $dbh->disconnect;
index 28fc571..84dc4f3 100644 (file)
@@ -215,7 +215,8 @@ sub fa_auswahl {
       $elster_land_fa{$FFFF} = $elster_init->{$elster_land}->{$FFFF}->[0];
     }
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
       $elster_land_fa{$FFFF} = $elster_init->{$elster_land}->{$FFFF}->[0];
     }
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
-                   keys(%elster_land_fa)) {
+                   keys(%elster_land_fa)
+      ) {
       print qq|
                    elsterFAAuswahl.options[$j] = new Option("$elster_land_fa{$ffff} ($ffff)","$ffff");|;
       $j++;
       print qq|
                    elsterFAAuswahl.options[$j] = new Option("$elster_land_fa{$ffff} ($ffff)","$ffff");|;
       $j++;
@@ -268,7 +269,8 @@ sub fa_auswahl {
     print qq|<option value="Auswahl" $checked>hier auswählen...</option>|;
   } else {
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
     print qq|<option value="Auswahl" $checked>hier auswählen...</option>|;
   } else {
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
-                   keys(%elster_land_fa)) {
+                   keys(%elster_land_fa)
+      ) {
 
       print qq|
                         <option value="$ffff"|;
 
       print qq|
                         <option value="$ffff"|;
@@ -556,7 +558,6 @@ sub process_query {
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
 
-
 sub ustva {
   $main::lxdebug->enter_sub();
 
 sub ustva {
   $main::lxdebug->enter_sub();
 
@@ -567,12 +568,12 @@ sub ustva {
 
   my $last_period     = 0;
   my $category        = "pos_ustva";
 
   my $last_period     = 0;
   my $category        = "pos_ustva";
-  my @categories_cent = qw(511 861 36 80 971 931 98 96 53 74 
-                           85 65 66 61 62 67 63 64 59 69 39 83 
-                           Z43 Z45 Z53 Z62 Z65 Z67);
-                           
-  my @categories_euro = qw(41 44 49 43 48 51 86 35 77 76 91 97 93 
-                           95 94 42 60 45 52 73 84);
+  my @categories_cent = qw(511 861 36 80 971 931 98 96 53 74
+    85 65 66 61 62 67 63 64 59 69 39 83
+    Z43 Z45 Z53 Z62 Z65 Z67);
+
+  my @categories_euro = qw(41 44 49 43 48 51 86 35 77 76 91 97 93
+    95 94 42 60 45 52 73 84);
 
   $form->{decimalplaces} *= 1;
 
 
   $form->{decimalplaces} *= 1;
 
@@ -583,10 +584,8 @@ sub ustva {
     $form->{"$item"} = 0;
   }
 
     $form->{"$item"} = 0;
   }
 
-
   &get_accounts_ustva($dbh, $last_period, $form->{fromdate}, $form->{todate},
   &get_accounts_ustva($dbh, $last_period, $form->{fromdate}, $form->{todate},
-                  $form, $category);
-
+                      $form, $category);
 
   #
   # Berechnung der USTVA Formularfelder
 
   #
   # Berechnung der USTVA Formularfelder
@@ -595,27 +594,27 @@ sub ustva {
   $form->{"86r"} = $form->{"861"};
   $form->{"97r"} = $form->{"971"};
   $form->{"93r"} = $form->{"931"};
   $form->{"86r"} = $form->{"861"};
   $form->{"97r"} = $form->{"971"};
   $form->{"93r"} = $form->{"931"};
-  $form->{"Z43"} = $form->{"511"}+ $form->{"861"} + 
-                   $form->{"36"} + $form->{"80"}  +
-                   $form->{"971"}+ $form->{"931"} + 
-                   $form->{"96"} + $form->{"98"};
+  $form->{"Z43"} =
+    $form->{"511"} + $form->{"861"} + $form->{"36"} + $form->{"80"} +
+    $form->{"971"} + $form->{"931"} + $form->{"96"} + $form->{"98"};
   $form->{"Z45"} = $form->{"Z43"};
   $form->{"Z53"} = $form->{"Z43"};
   $form->{"Z45"} = $form->{"Z43"};
   $form->{"Z53"} = $form->{"Z43"};
-  $form->{"Z62"} = $form->{"Z43"}- $form->{"66"} -
-                   $form->{"61"} - $form->{"62"} -
-                   $form->{"63"} - $form->{"64"} -
-                   $form->{"59"};
-  $form->{"Z65"} = $form->{"Z62"}- $form->{"69"};
-  $form->{"83"}  = $form->{"Z65"}- $form->{"39"};
-  
+  $form->{"Z62"} =
+    $form->{"Z43"} - $form->{"66"} - $form->{"61"} - $form->{"62"} -
+    $form->{"63"} - $form->{"64"} - $form->{"59"};
+  $form->{"Z65"} = $form->{"Z62"} - $form->{"69"};
+  $form->{"83"}  = $form->{"Z65"} - $form->{"39"};
+
   foreach $item (@categories_cent) {
     $form->{$item} =
   foreach $item (@categories_cent) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2), 2, '0');
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2),
+                           2, '0');
   }
 
   foreach $item (@categories_euro) {
     $form->{$item} =
   }
 
   foreach $item (@categories_euro) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0), 0, '0');
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0),
+                           0, '0');
   }
 
   $dbh->disconnect;
   }
 
   $dbh->disconnect;
@@ -637,8 +636,8 @@ sub get_accounts_ustva {
   my $where    = "1 = 1";
   my $glwhere  = "";
   my $subwhere = "";
   my $where    = "1 = 1";
   my $glwhere  = "";
   my $subwhere = "";
-  my $ARwhere = "";
-  my $arwhere = "";
+  my $ARwhere  = "";
+  my $arwhere  = "";
   my $item;
 
   if ($fromdate) {
   my $item;
 
   if ($fromdate) {
@@ -652,7 +651,7 @@ sub get_accounts_ustva {
 
   if ($todate) {
     $where    .= " AND ac.transdate <= '$todate'";
 
   if ($todate) {
     $where    .= " AND ac.transdate <= '$todate'";
-    $ARwhere    .= " AND acc.transdate <= '$todate'";
+    $ARwhere  .= " AND acc.transdate <= '$todate'";
     $subwhere .= " AND transdate <= '$todate'";
   }
 
     $subwhere .= " AND transdate <= '$todate'";
   }
 
@@ -861,6 +860,7 @@ sub get_accounts_ustva {
   my @accno;
   my $accno;
   my $ref;
   my @accno;
   my $accno;
   my $ref;
+
   #print $query;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
   #print $query;
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
@@ -884,5 +884,4 @@ sub get_accounts_ustva {
   $main::lxdebug->leave_sub();
 }
 
   $main::lxdebug->leave_sub();
 }
 
-
 1;
 1;
index 95cb353..e0ae42f 100644 (file)
@@ -111,7 +111,7 @@ sub account_header {
              </tr>|;
 
   $form->{selectustva} = "<option>\n";
              </tr>|;
 
   $form->{selectustva} = "<option>\n";
-  
+
   %ustva = (35  => $locale->text('UStVA-Nr. 35'),
             36  => $locale->text('UStVA-Nr. 36'),
             39  => $locale->text('UStVA-Nr. 39'),
   %ustva = (35  => $locale->text('UStVA-Nr. 35'),
             36  => $locale->text('UStVA-Nr. 36'),
             39  => $locale->text('UStVA-Nr. 39'),
@@ -144,17 +144,17 @@ sub account_header {
             84  => $locale->text('UStVA-Nr. 84'),
             85  => $locale->text('UStVA-Nr. 85'),
             86  => $locale->text('UStVA-Nr. 86 left'),
             84  => $locale->text('UStVA-Nr. 84'),
             85  => $locale->text('UStVA-Nr. 85'),
             86  => $locale->text('UStVA-Nr. 86 left'),
-            861 => $locale->text('UStVA-Nr. 86 right'),            
+            861 => $locale->text('UStVA-Nr. 86 right'),
             91  => $locale->text('UStVA-Nr. 91'),
             93  => $locale->text('UStVA-Nr. 93 left'),
             91  => $locale->text('UStVA-Nr. 91'),
             93  => $locale->text('UStVA-Nr. 93 left'),
-            931 => $locale->text('UStVA-Nr. 93 right'),            
+            931 => $locale->text('UStVA-Nr. 93 right'),
             94  => $locale->text('UStVA-Nr. 94'),
             95  => $locale->text('UStVA-Nr. 95'),
             96  => $locale->text('UStVA-Nr. 96'),
             97  => $locale->text('UStVA-Nr. 97 links'),
             971 => $locale->text('UStVA-Nr. 97 rechts'),
             98  => $locale->text('UStVA-Nr. 98'));
             94  => $locale->text('UStVA-Nr. 94'),
             95  => $locale->text('UStVA-Nr. 95'),
             96  => $locale->text('UStVA-Nr. 96'),
             97  => $locale->text('UStVA-Nr. 97 links'),
             971 => $locale->text('UStVA-Nr. 97 rechts'),
             98  => $locale->text('UStVA-Nr. 98'));
-            
+
   foreach $item (sort({ $a cmp $b } keys %ustva)) {
     if ($item == $form->{pos_ustva}) {
       $form->{selectustva} .= "<option value=$item selected>$ustva{$item}\n";
   foreach $item (sort({ $a cmp $b } keys %ustva)) {
     if ($item == $form->{pos_ustva}) {
       $form->{selectustva} .= "<option value=$item selected>$ustva{$item}\n";
@@ -1611,7 +1611,7 @@ sub config {
       ? "<option selected>$item\n"
       : "<option>$item\n";
   }
       ? "<option selected>$item\n"
       : "<option>$item\n";
   }
-  
+
   foreach $item (qw(name company address signature)) {
     $myconfig{$item} =~ s/\"/&quot;/g;
   }
   foreach $item (qw(name company address signature)) {
     $myconfig{$item} =~ s/\"/&quot;/g;
   }
@@ -1631,22 +1631,20 @@ sub config {
       : "<option value=$key>$countrycodes{$key}\n";
   }
   $countrycodes = "<option>American English\n$countrycodes";
       : "<option value=$key>$countrycodes{$key}\n";
   }
   $countrycodes = "<option>American English\n$countrycodes";
-  
+
   # use an other input number format than output numberformat
   # look at Form.pm, sub parse_amount
   # use an other input number format than output numberformat
   # look at Form.pm, sub parse_amount
-  my $ in_numberformat = '';
+  my $in_numberformat = '';
   $text1 = qq|value="0">| . $locale->text('equal Outputformat');
   $text2 = qq|value="1">| . $locale->text('1000,00 or 1000.00');
   @in_nf = ($text1, $text2);
   $text1 = qq|value="0">| . $locale->text('equal Outputformat');
   $text2 = qq|value="1">| . $locale->text('1000,00 or 1000.00');
   @in_nf = ($text1, $text2);
-  foreach $item ( @in_nf ) {
+  foreach $item (@in_nf) {
     $in_numberformat .=
     $in_numberformat .=
-      ( substr($item, 7, 1) eq $myconfig{in_numberformat})
+      (substr($item, 7, 1) eq $myconfig{in_numberformat})
       ? "<option selected $item\n"
       : "<option $item\n";
   }
 
       ? "<option selected $item\n"
       : "<option $item\n";
   }
 
-
-  
   foreach $key (keys %{ $form->{IC} }) {
     foreach $accno (sort keys %{ $form->{IC}{$key} }) {
       $myconfig{$key} .=
   foreach $key (keys %{ $form->{IC} }) {
     foreach $accno (sort keys %{ $form->{IC}{$key} }) {
       $myconfig{$key} .=
index ffb4b1f..4e494cd 100644 (file)
@@ -569,7 +569,7 @@ $jsscript
     $tax =~ s/value=\"$tax_selected\"/value=\"$tax_selected\" selected/;
     $tax =
       qq|<td><select id="taxchart_$i" name="taxchart_$i" style="width:200px">$tax</select></td>|;
     $tax =~ s/value=\"$tax_selected\"/value=\"$tax_selected\" selected/;
     $tax =
       qq|<td><select id="taxchart_$i" name="taxchart_$i" style="width:200px">$tax</select></td>|;
-    $korrektur_checked = ($form->{"korrektur_$i"}?'checked':'');
+    $korrektur_checked = ($form->{"korrektur_$i"} ? 'checked' : '');
 
     print qq|
        <tr>
 
     print qq|
        <tr>
index 9378901..a39cdd1 100644 (file)
@@ -160,14 +160,12 @@ sub search {
     $button1 = qq|
        <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
        <input type=button name=transdatefrom id="trigger1" value=|
     $button1 = qq|
        <td><input name=transdatefrom id=transdatefrom size=11 title="$myconfig{dateformat}">
        <input type=button name=transdatefrom id="trigger1" value=|
-      . $locale->text('button')
-      . qq|></td>
+      . $locale->text('button') . qq|></td>
       |;
     $button2 = qq|
        <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
        <input type=button name=transdateto name=transdateto id="trigger2" value=|
       |;
     $button2 = qq|
        <td><input name=transdateto id=transdateto size=11 title="$myconfig{dateformat}">
        <input type=button name=transdateto name=transdateto id="trigger2" value=|
-      . $locale->text('button')
-      . qq|></td>
+      . $locale->text('button') . qq|></td>
      |;
 
     #write Trigger
      |;
 
     #write Trigger
@@ -281,7 +279,8 @@ sub remove {
 <h2 class=confirm>$form->{title}</h2>
 
 <h4>|
 <h2 class=confirm>$form->{title}</h2>
 
 <h4>|
-    . $locale->text('Are you sure you want to remove the marked entries from the queue?')
+    . $locale->text(
+          'Are you sure you want to remove the marked entries from the queue?')
     . qq|</h4>
 
 <input name=action class=submit type=submit value="|
     . qq|</h4>
 
 <input name=action class=submit type=submit value="|
index 56ae608..de36049 100644 (file)
@@ -235,8 +235,7 @@ sub list {
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
          <td colspan=3>
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
          <td colspan=3>
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
-    . $locale->text('Subtotal')
-    . qq|</td>
+    . $locale->text('Subtotal') . qq|</td>
        </tr>
       </table>
     </td>
        </tr>
       </table>
     </td>
index 6cde7f8..7836eb2 100644 (file)
@@ -185,8 +185,7 @@ sub form_header {
     $button1 = qq|
        <td><input name=datepaid id=datepaid size=11 title="$myconfig{dateformat}" value="$form->{datepaid}">
        <input type=button name=datepaid id="trigger1" value=|
     $button1 = qq|
        <td><input name=datepaid id=datepaid size=11 title="$myconfig{dateformat}" value="$form->{datepaid}">
        <input type=button name=datepaid id="trigger1" value=|
-      . $locale->text('button')
-      . qq|></td>
+      . $locale->text('button') . qq|></td>
        |;
 
     #write Trigger
        |;
 
     #write Trigger
@@ -306,8 +305,7 @@ sub form_header {
              <tr>
                <th align=right nowrap>| . $locale->text('Amount') . qq|</th>
                <td colspan=3><input name=amount size=10 value=|
              <tr>
                <th align=right nowrap>| . $locale->text('Amount') . qq|</th>
                <td colspan=3><input name=amount size=10 value=|
-    . $form->format_amount(\%myconfig, $form->{amount}, 2)
-    . qq|></td>
+    . $form->format_amount(\%myconfig, $form->{amount}, 2) . qq|></td>
              </tr>
            </table>
          </td>
              </tr>
            </table>
          </td>
@@ -365,7 +363,8 @@ sub list_invoices {
   for $i (1 .. $form->{rowcount}) {
 
     map {
   for $i (1 .. $form->{rowcount}) {
 
     map {
-      $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+      $form->{"${_}_$i"} =
+        $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
     } qw(amount due paid);
 
     $totalamount += $form->{"amount_$i"};
     } qw(amount due paid);
 
     $totalamount += $form->{"amount_$i"};
@@ -608,7 +607,8 @@ sub update {
   for $i (1 .. $form->{rowcount}) {
 
     map {
   for $i (1 .. $form->{rowcount}) {
 
     map {
-      $form->{"${_}_$i"} = $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
+      $form->{"${_}_$i"} =
+        $form->parse_amount(\%myconfig, $form->{"${_}_$i"})
     } qw(amount due paid);
 
     if ($form->{"checked_$i"}) {
     } qw(amount due paid);
 
     if ($form->{"checked_$i"}) {
index 09068dc..aa8459d 100644 (file)
@@ -585,35 +585,37 @@ sub form_header {
 ## /LINET
 
   if ($form->{db} eq 'customer') {
 ## /LINET
 
   if ($form->{db} eq 'customer') {
-  #get pricegroup and form it
-  $form->get_pricegroup(\%myconfig, { all => 1 });
 
 
-  $form->{pricegroup}    = "$form->{klass}";
-  $form->{pricegroup_id} = "$form->{klass}";
+    #get pricegroup and form it
+    $form->get_pricegroup(\%myconfig, { all => 1 });
 
 
-  if (@{ $form->{all_pricegroup} }) {
+    $form->{pricegroup}    = "$form->{klass}";
+    $form->{pricegroup_id} = "$form->{klass}";
 
 
-    $form->{selectpricegroup} = qq|<option>\n|;
-    map {
-      $form->{selectpricegroup} .=
-        qq|<option value="$_->{id}">$_->{pricegroup}\n|
-    } @{ $form->{all_pricegroup} };
-  }
+    if (@{ $form->{all_pricegroup} }) {
+
+      $form->{selectpricegroup} = qq|<option>\n|;
+      map {
+        $form->{selectpricegroup} .=
+          qq|<option value="$_->{id}">$_->{pricegroup}\n|
+      } @{ $form->{all_pricegroup} };
+    }
 
 
-  if ($form->{selectpricegroup}) {
-    $form->{selectpricegroup} = $form->unescape($form->{selectpricegroup});
+    if ($form->{selectpricegroup}) {
+      $form->{selectpricegroup} = $form->unescape($form->{selectpricegroup});
 
 
-    $pricegroup =
-      qq|<input type=hidden name=selectpricegroup value="|
-      . $form->escape($form->{selectpricegroup}, 1) . qq|">|;
+      $pricegroup =
+        qq|<input type=hidden name=selectpricegroup value="|
+        . $form->escape($form->{selectpricegroup}, 1) . qq|">|;
 
 
-    $form->{selectpricegroup} =~
-      s/(<option value="\Q$form->{klass}\E")/$1 selected/;
+      $form->{selectpricegroup} =~
+        s/(<option value="\Q$form->{klass}\E")/$1 selected/;
 
 
-    $pricegroup .= qq|<select name=klass>$form->{selectpricegroup}</select>|;
+      $pricegroup .= qq|<select name=klass>$form->{selectpricegroup}</select>|;
 
 
+    }
   }
   }
- }
+
   # $locale->text('Customer Number')
   # $locale->text('Vendor Number')
   $form->{fokus} = "ct.name";
   # $locale->text('Customer Number')
   # $locale->text('Vendor Number')
   $form->{fokus} = "ct.name";
@@ -780,12 +782,13 @@ sub form_header {
          <th align=right>| . $locale->text('Language') . qq|</th>
          <td><select name=language tabindex=23>$lang
                           </select></td>|;
          <th align=right>| . $locale->text('Language') . qq|</th>
          <td><select name=language tabindex=23>$lang
                           </select></td>|;
-if ($form->{db} eq 'customer'){
 
 
-print qq|
+  if ($form->{db} eq 'customer') {
+
+    print qq|
           <th align=right>| . $locale->text('Preisklasse') . qq|</th>
           <td>$pricegroup</td>|;
           <th align=right>| . $locale->text('Preisklasse') . qq|</th>
           <td>$pricegroup</td>|;
-}
+  }
   print qq|        </tr>
         <tr>
           <td align=right>| . $locale->text('Obsolete') . qq|</td>
   print qq|        </tr>
         <tr>
           <td align=right>| . $locale->text('Obsolete') . qq|</td>
index 01c519d..62a1cf0 100644 (file)
@@ -81,8 +81,7 @@ sub export {
        </tr>
        <tr>
          <td><input checked name=kne type=checkbox class=checkbox value=1> |
        </tr>
        <tr>
          <td><input checked name=kne type=checkbox class=checkbox value=1> |
-    . $locale->text("Kontonummernerweiterung (KNE)")
-    . qq|</td>
+    . $locale->text("Kontonummernerweiterung (KNE)") . qq|</td>
           <td></td>
 
          <td align=left nowrap>| . $locale->text("Abrechnungsnummer") . qq|</td>
           <td></td>
 
          <td align=left nowrap>| . $locale->text("Abrechnungsnummer") . qq|</td>
@@ -90,13 +89,11 @@ sub export {
        </tr>
         <tr>
           <td><input name=exporttype type=radio class=radio value=0 checked> |
        </tr>
         <tr>
           <td><input name=exporttype type=radio class=radio value=0 checked> |
-    . $locale->text("Export Buchungsdaten")
-    . qq|</td>
+    . $locale->text("Export Buchungsdaten") . qq|</td>
           <td></td>
 
          <td><input name=exporttype type=radio class=radio value=1> |
           <td></td>
 
          <td><input name=exporttype type=radio class=radio value=1> |
-    . $locale->text("Export Stammdaten")
-    . qq|</td>
+    . $locale->text("Export Stammdaten") . qq|</td>
           <td></td>
        </td>
       </table>
           <td></td>
        </td>
       </table>
@@ -145,38 +142,27 @@ sub export_bewegungsdaten {
     . $locale->text('January')
     . qq|</option>
                          <option value=2>|
     . $locale->text('January')
     . qq|</option>
                          <option value=2>|
-    . $locale->text('February')
-    . qq|</option>
+    . $locale->text('February') . qq|</option>
                          <option value=3>|
                          <option value=3>|
-    . $locale->text('March')
-    . qq|</option>
+    . $locale->text('March') . qq|</option>
                          <option value=4>|
                          <option value=4>|
-    . $locale->text('April')
-    . qq|</option>
+    . $locale->text('April') . qq|</option>
                          <option value=5>|
                          <option value=5>|
-    . $locale->text('May')
-    . qq|</option>
+    . $locale->text('May') . qq|</option>
                          <option value=6>|
                          <option value=6>|
-    . $locale->text('June')
-    . qq|</option>
+    . $locale->text('June') . qq|</option>
                          <option value=7>|
                          <option value=7>|
-    . $locale->text('July')
-    . qq|</option>
+    . $locale->text('July') . qq|</option>
                          <option value=8>|
                          <option value=8>|
-    . $locale->text('August')
-    . qq|</option>
+    . $locale->text('August') . qq|</option>
                          <option value=9>|
                          <option value=9>|
-    . $locale->text('September')
-    . qq|</option>
+    . $locale->text('September') . qq|</option>
                          <option value=10>|
                          <option value=10>|
-    . $locale->text('October')
-    . qq|</option>
+    . $locale->text('October') . qq|</option>
                          <option value=11>|
                          <option value=11>|
-    . $locale->text('November')
-    . qq|</option>
+    . $locale->text('November') . qq|</option>
                          <option value=12>|
                          <option value=12>|
-    . $locale->text('December')
-    . qq|</option>|;
+    . $locale->text('December') . qq|</option>|;
 
   $form->{allequartale} =
       qq|<option selected value=1>|
 
   $form->{allequartale} =
       qq|<option selected value=1>|
@@ -184,11 +170,9 @@ sub export_bewegungsdaten {
     . qq|</option>
                          <option value=2>| . $locale->text('II') . qq|</option>
                          <option value=3>|
     . qq|</option>
                          <option value=2>| . $locale->text('II') . qq|</option>
                          <option value=3>|
-    . $locale->text('III')
-    . qq|</option>
+    . $locale->text('III') . qq|</option>
                          <option value=4>|
                          <option value=4>|
-    . $locale->text('IV')
-    . qq|</option>|;
+    . $locale->text('IV') . qq|</option>|;
   $form->header;
 
   print qq|
   $form->header;
 
   print qq|
@@ -210,24 +194,21 @@ sub export_bewegungsdaten {
       <table>
        <tr>
           <td align=left><input checked name=zeitraum class=radio type=radio value=monat>&nbsp;</td><td align=left>|
       <table>
        <tr>
           <td align=left><input checked name=zeitraum class=radio type=radio value=monat>&nbsp;</td><td align=left>|
-    . $locale->text('Monat')
-    . qq|</td>
+    . $locale->text('Monat') . qq|</td>
           <td align=left></td>
          <td align=left></td>
           <td align=left><select name=monat>$form->{allemonate}</select></td>
         </tr>
         <tr>
           <td align=left><input name=zeitraum class=radio type=radio value=quartal>&nbsp;</td><td align=left>|
           <td align=left></td>
          <td align=left></td>
           <td align=left><select name=monat>$form->{allemonate}</select></td>
         </tr>
         <tr>
           <td align=left><input name=zeitraum class=radio type=radio value=quartal>&nbsp;</td><td align=left>|
-    . $locale->text('Quartal')
-    . qq|</td>
+    . $locale->text('Quartal') . qq|</td>
          <td align=left></td>
           <td align=left></td>
           <td align=left><select name=quartal>$form->{allequartale}</select></td>
         </tr>
         <tr>
           <td align=left><input name=zeitraum class=radio type=radio value=zeit>&nbsp;</td><td align=left>|
          <td align=left></td>
           <td align=left></td>
           <td align=left><select name=quartal>$form->{allequartale}</select></td>
         </tr>
         <tr>
           <td align=left><input name=zeitraum class=radio type=radio value=zeit>&nbsp;</td><td align=left>|
-    . $locale->text('Datum von')
-    . qq|</td>
+    . $locale->text('Datum von') . qq|</td>
           <td align=left><input name=transdatefrom size=8></td>
          <td align=left>| . $locale->text('bis') . qq|</td>
           <td align=left><input name=transdateto size=8></td>
           <td align=left><input name=transdatefrom size=8></td>
          <td align=left>| . $locale->text('bis') . qq|</td>
           <td align=left><input name=transdateto size=8></td>
index 9e84029..b2b7885 100644 (file)
@@ -620,15 +620,17 @@ sub generate_report {
         </tr>
 |;
   }
         </tr>
 |;
   }
-   $form->{balance} *= $ml;
+  $form->{balance} *= $ml;
   foreach $ref (@{ $form->{GL} }) {
     $form->{balance} *= $ml;
   foreach $ref (@{ $form->{GL} }) {
     $form->{balance} *= $ml;
+
     # if item ne sort print subtotal
     if ($form->{l_subtotal} eq 'Y') {
       if ($sameitem ne $ref->{ $form->{sort} }) {
         &gl_subtotal;
       }
     }
     # if item ne sort print subtotal
     if ($form->{l_subtotal} eq 'Y') {
       if ($sameitem ne $ref->{ $form->{sort} }) {
         &gl_subtotal;
       }
     }
+
     #foreach $key (sort keys(%{ $ref->{amount} })) {
     #  $form->{balance} += $ref->{amount}{$key};
     #}
     #foreach $key (sort keys(%{ $ref->{amount} })) {
     #  $form->{balance} += $ref->{amount}{$key};
     #}
@@ -656,7 +658,7 @@ sub generate_report {
         $credit .= "<br>"
           . $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
       }
         $credit .= "<br>"
           . $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
       }
-      $form->{balance} = abs($form->{balance}) - abs( $ref->{credit}{$key});
+      $form->{balance} = abs($form->{balance}) - abs($ref->{credit}{$key});
     }
 
     $debittax = "";
     }
 
     $debittax = "";
@@ -698,9 +700,10 @@ sub generate_report {
         $debitaccno .=
           "<br><a href=$href&accno=$ref->{debit_accno}{$key}&callback=$callback>$ref->{debit_accno}{$key}</a>";
       }
         $debitaccno .=
           "<br><a href=$href&accno=$ref->{debit_accno}{$key}&callback=$callback>$ref->{debit_accno}{$key}</a>";
       }
-#       if ($ref->{debit_taxkey}{$key} eq $debittaxkey) {
-#         $ref->{debit_tax_accno}{$key} = $taxaccno;
-#       }
+
+      #       if ($ref->{debit_taxkey}{$key} eq $debittaxkey) {
+      #         $ref->{debit_tax_accno}{$key} = $taxaccno;
+      #       }
       $taxaccno    = $ref->{debit_tax_accno}{$key};
       $debittaxkey = $ref->{debit_taxkey}{$key};
     }
       $taxaccno    = $ref->{debit_tax_accno}{$key};
       $debittaxkey = $ref->{debit_taxkey}{$key};
     }
@@ -716,9 +719,10 @@ sub generate_report {
         $creditaccno .=
           "<br><a href=$href&accno=$ref->{credit_accno}{$key}&callback=$callback>$ref->{credit_accno}{$key}</a>";
       }
         $creditaccno .=
           "<br><a href=$href&accno=$ref->{credit_accno}{$key}&callback=$callback>$ref->{credit_accno}{$key}</a>";
       }
-#       if ($ref->{credit_taxkey}{$key} eq $credittaxkey) {
-#         $ref->{credit_tax_accno}{$key} = $taxaccno;
-#       }
+
+      #       if ($ref->{credit_taxkey}{$key} eq $credittaxkey) {
+      #         $ref->{credit_tax_accno}{$key} = $taxaccno;
+      #       }
       $taxaccno     = $ref->{credit_tax_accno}{$key};
       $credittaxkey = $ref->{credit_taxkey}{$key};
     }
       $taxaccno     = $ref->{credit_tax_accno}{$key};
       $credittaxkey = $ref->{credit_taxkey}{$key};
     }
@@ -776,9 +780,8 @@ sub generate_report {
     $column_data{gifi_accno}       =
       "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a>&nbsp;</td>";
     $column_data{balance} =
     $column_data{gifi_accno}       =
       "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a>&nbsp;</td>";
     $column_data{balance} =
-        "<td align=right>"
-      . $form->format_amount(\%myconfig, $form->{balance}, 2, 0)
-      . "</td>";
+      "<td align=right>"
+      . $form->format_amount(\%myconfig, $form->{balance}, 2, 0) . "</td>";
 
     $i++;
     $i %= 2;
 
     $i++;
     $i %= 2;
@@ -1052,13 +1055,14 @@ sub display_rows {
       <td><select name="accno_$i" onChange="setTaxkey(this, $i)" style="width:200px" tabindex=|
         . ($i + 5 + (($i - 1) * 8)) . qq|>$form->{chartinit}</select></td>|;
       $tax =
       <td><select name="accno_$i" onChange="setTaxkey(this, $i)" style="width:200px" tabindex=|
         . ($i + 5 + (($i - 1) * 8)) . qq|>$form->{chartinit}</select></td>|;
       $tax =
-          qq|<td><select id="taxchart_$i" name="taxchart_$i" style="width:200px" tabindex=|
+        qq|<td><select id="taxchart_$i" name="taxchart_$i" style="width:200px" tabindex=|
         . ($i + 10 + (($i - 1) * 8))
         . qq|>$form->{taxchart}</select></td>|;
         . ($i + 10 + (($i - 1) * 8))
         . qq|>$form->{taxchart}</select></td>|;
-#       if ($form->{selectprojectnumber}) {
-#         $project = qq|
-#     <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
-#       }
+
+      #       if ($form->{selectprojectnumber}) {
+      #         $project = qq|
+      #     <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
+      #       }
       $korrektur =
         qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
         . ($i + 9 + (($i - 1) * 8))
       $korrektur =
         qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
         . ($i + 9 + (($i - 1) * 8))
@@ -1107,14 +1111,14 @@ sub display_rows {
           . ($i + 10 + (($i - 1) * 8))
           . qq|>$tax</select></td>|;
 
           . ($i + 10 + (($i - 1) * 8))
           . qq|>$tax</select></td>|;
 
-#         if ($form->{selectprojectnumber}) {
-#           $form->{"projectnumber_$i"} = ""
-#             if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/;
-# 
-#           $project = $form->{"projectnumber_$i"};
-#           $project =~ s/--.*//;
-#           $project = qq|<td>$project</td>|;
-#         }
+        #         if ($form->{selectprojectnumber}) {
+        #           $form->{"projectnumber_$i"} = ""
+        #             if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/;
+        #
+        #           $project = $form->{"projectnumber_$i"};
+        #           $project =~ s/--.*//;
+        #           $project = qq|<td>$project</td>|;
+        #         }
 
         if ($form->{transfer}) {
           $checked = ($form->{"fx_transaction_$i"}) ? "1" : "";
 
         if ($form->{transfer}) {
           $checked = ($form->{"fx_transaction_$i"}) ? "1" : "";
@@ -1138,10 +1142,11 @@ sub display_rows {
         $tax = qq|
       <td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
           . ($i + 10 + (($i - 1) * 8)) . qq|>$taxchart</select></td>|;
         $tax = qq|
       <td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
           . ($i + 10 + (($i - 1) * 8)) . qq|>$taxchart</select></td>|;
-#         if ($form->{selectprojectnumber}) {
-#           $project = qq|
-#       <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
-#         }
+
+        #         if ($form->{selectprojectnumber}) {
+        #           $project = qq|
+        #       <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
+        #         }
         $korrektur =
           qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
           . ($i + 9 + (($i - 1) * 8))
         $korrektur =
           qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
           . ($i + 9 + (($i - 1) * 8))
@@ -1182,9 +1187,10 @@ sub display_rows {
   }
 
   $form->hide_form(qw(rowcount selectaccno));
   }
 
   $form->hide_form(qw(rowcount selectaccno));
-#   print qq|
-# <input type=hidden name=selectprojectnumber value="|
-#     . $form->escape($form->{selectprojectnumber}, 1) . qq|">|;
+
+  #   print qq|
+  # <input type=hidden name=selectprojectnumber value="|
+  #     . $form->escape($form->{selectprojectnumber}, 1) . qq|">|;
   $lxdebug->leave_sub();
 
 }
   $lxdebug->leave_sub();
 
 }
@@ -1546,9 +1552,9 @@ sub post {
       unless (($form->{"debit_$i"} eq "") && ($form->{"credit_$i"} eq "")) {
         if ($form->{"debit_$i"} ne "") {
           $form->{"credit_$i"} = $form->{"debit_$i"};
       unless (($form->{"debit_$i"} eq "") && ($form->{"credit_$i"} eq "")) {
         if ($form->{"debit_$i"} ne "") {
           $form->{"credit_$i"} = $form->{"debit_$i"};
-          $form->{"debit_$i"} = "";
+          $form->{"debit_$i"}  = "";
         } elsif ($form->{"credit_$i"} ne "") {
         } elsif ($form->{"credit_$i"} ne "") {
-          $form->{"debit_$i"} = $form->{"credit_$i"};
+          $form->{"debit_$i"}  = $form->{"credit_$i"};
           $form->{"credit_$i"} = "";
         }
       }
           $form->{"credit_$i"} = "";
         }
       }
index f6134db..bcd1405 100644 (file)
@@ -33,6 +33,7 @@
 #$locale->text('ea');
 
 use SL::IC;
 #$locale->text('ea');
 
 use SL::IC;
+
 #use SL::PE;
 
 require "$form->{path}/io.pl";
 #use SL::PE;
 
 require "$form->{path}/io.pl";
@@ -1934,7 +1935,7 @@ sub form_header {
   $lxdebug->enter_sub();
 
   my $dec = '';
   $lxdebug->enter_sub();
 
   my $dec = '';
-  
+
   #decimalplaces for listprice
   ($dec) = ($form->{listprice} =~ /\.(\d+)/);
   $dec = length $dec;
   #decimalplaces for listprice
   ($dec) = ($form->{listprice} =~ /\.(\d+)/);
   $dec = length $dec;
@@ -2718,7 +2719,8 @@ sub save {
   # $locale->text('Assembly Number missing!')
 
   # save part
   # $locale->text('Assembly Number missing!')
 
   # save part
-  $lxdebug->message(LXDebug::DEBUG1, "ic.pl: sellprice in save = $form->{sellprice}\n");
+  $lxdebug->message(LXDebug::DEBUG1,
+                    "ic.pl: sellprice in save = $form->{sellprice}\n");
   $rc = IC->save(\%myconfig, \%$form);
   if ($rc == 3) {
     $form->error($locale->text('Partnumber not unique!'));
   $rc = IC->save(\%myconfig, \%$form);
   if ($rc == 3) {
     $form->error($locale->text('Partnumber not unique!'));
@@ -2776,7 +2778,9 @@ sub save {
       if ($form->{exchangerate} != 0) {
         $form->{"sellprice_$i"} /= $form->{exchangerate};
       }
       if ($form->{exchangerate} != 0) {
         $form->{"sellprice_$i"} /= $form->{exchangerate};
       }
-      $lxdebug->message(LXDebug::DEBUG1, qq|sellprice_$i in previousform 2 = |.$form->{"sellprice_$i"}.qq|\n|);
+      $lxdebug->message(LXDebug::DEBUG1,
+                        qq|sellprice_$i in previousform 2 = |
+                          . $form->{"sellprice_$i"} . qq|\n|);
       map { $form->{"taxaccounts_$i"} .= "$_ " } split / /,
         $newform{taxaccount};
       chop $form->{"taxaccounts_$i"};
       map { $form->{"taxaccounts_$i"} .= "$_ " } split / /,
         $newform{taxaccount};
       chop $form->{"taxaccounts_$i"};
@@ -2797,10 +2801,12 @@ sub save {
 
       $form->{creditremaining} -= $amount;
 
 
       $form->{creditremaining} -= $amount;
 
-    # redo number formatting, because invoice parse them!
-    $i = $form->{rowcount};
-    map { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}) }
-    qw(weight listprice sellprice rop);
+      # redo number formatting, because invoice parse them!
+      $i = $form->{rowcount};
+      map {
+        $form->{"${_}_$i"} =
+          $form->format_amount(\%myconfig, $form->{"${_}_$i"})
+      } qw(weight listprice sellprice rop);
     }
 
     $form->{"id_$i"} = $parts_id;
     }
 
     $form->{"id_$i"} = $parts_id;
@@ -2822,7 +2828,10 @@ sub save {
     }
     $form->{callback} = $callback;
   }
     }
     $form->{callback} = $callback;
   }
-  $lxdebug->message(LXDebug::DEBUG1, qq|ic.pl: sellprice_$i nach sub save = |.$form->{"sellprice_$i"}.qq|\n|);
+  $lxdebug->message(LXDebug::DEBUG1,
+                    qq|ic.pl: sellprice_$i nach sub save = |
+                      . $form->{"sellprice_$i"} . qq|\n|);
+
   # redirect
   $form->redirect;
 
   # redirect
   $form->redirect;
 
index 03fd32a..4291cf5 100644 (file)
@@ -399,7 +399,10 @@ sub display_row {
                  <input type=hidden name="project_id_$i" value="$form->{"project_id_$i"}">
 |;
     if ($form->{type} eq 'invoice' or $form->{type} =~ /order/) {
                  <input type=hidden name="project_id_$i" value="$form->{"project_id_$i"}">
 |;
     if ($form->{type} eq 'invoice' or $form->{type} =~ /order/) {
-      my $reqdate_term = ($form->{type} eq 'invoice')?'deliverydate':'reqdate'; # invoice uses a different term for the same thing.
+      my $reqdate_term =
+        ($form->{type} eq 'invoice')
+        ? 'deliverydate'
+        : 'reqdate';    # invoice uses a different term for the same thing.
       print qq|
         <b>${$reqdate_term}</b>&nbsp;<input name="${reqdate_term}_$i" size=11 value="$form->{"${reqdate_term}_$i"}">
 |;
       print qq|
         <b>${$reqdate_term}</b>&nbsp;<input name="${reqdate_term}_$i" size=11 value="$form->{"${reqdate_term}_$i"}">
 |;
@@ -441,9 +444,10 @@ sub set_pricegroup {
       $prices = '';
       $price  = 0;
       foreach $item (@{ $form->{PRICES}{$j} }) {
       $prices = '';
       $price  = 0;
       foreach $item (@{ $form->{PRICES}{$j} }) {
+
         #$price = $form->round_amount($myconfig,  $item->{price}, 5);
         #$price = $form->format_amount($myconfig, $item->{price}, 2);
         #$price = $form->round_amount($myconfig,  $item->{price}, 5);
         #$price = $form->format_amount($myconfig, $item->{price}, 2);
-        $price = $item->{price};
+        $price         = $item->{price};
         $pricegroup_id = $item->{pricegroup_id};
         $pricegroup    = $item->{pricegroup};
 
         $pricegroup_id = $item->{pricegroup_id};
         $pricegroup    = $item->{pricegroup};
 
@@ -452,10 +456,11 @@ sub set_pricegroup {
           qq|<option value="$price--$pricegroup_id"$item->{selected}>$pricegroup</option>\n|;
 
         $len += 1;
           qq|<option value="$price--$pricegroup_id"$item->{selected}>$pricegroup</option>\n|;
 
         $len += 1;
-#        map {
-#               $form->{"${_}_$j"} =
-#               $form->format_amount(\%myconfig, $form->{"${_}_$j"})
-#              } qw(sellprice price_new price_old);
+
+        #        map {
+        #               $form->{"${_}_$j"} =
+        #               $form->format_amount(\%myconfig, $form->{"${_}_$j"})
+        #              } qw(sellprice price_new price_old);
 
         # set new selectedpricegroup_id and prices for "Preis"
         if ($item->{selected} && ($pricegroup_id != 0)) {
 
         # set new selectedpricegroup_id and prices for "Preis"
         if ($item->{selected} && ($pricegroup_id != 0)) {
@@ -771,39 +776,40 @@ sub display_form {
     &{"$form->{display_form}"};
     exit;
   }
     &{"$form->{display_form}"};
     exit;
   }
-#   if (   $form->{print_and_post}
-#       && $form->{second_run}
-#       && ($form->{action} eq "display_form")) {
-#     for (keys %$form) { $old_form->{$_} = $form->{$_} }
-#     $old_form->{rowcount}++;
-# 
-#     #$form->{rowcount}--;
-#     #$form->{rowcount}--;
-# 
-#     $form->{print_and_post} = 0;
-# 
-#     &print_form($old_form);
-#     exit;
-#   }
-# 
-#   $form->{action}   = "";
-#   $form->{resubmit} = 0;
-# 
-#   if ($form->{print_and_post} && !$form->{second_run}) {
-#     $form->{second_run} = 1;
-#     $form->{action}     = "display_form";
-#     $form->{rowcount}--;
-#     my $rowcount = $form->{rowcount};
-# 
-#     # get pricegroups for parts
-#     IS->get_pricegroups_for_parts(\%myconfig, \%$form);
-# 
-#     # build up html code for prices_$i
-#     set_pricegroup($rowcount);
-# 
-#     $form->{resubmit} = 1;
-# 
-#   }
+
+  #   if (   $form->{print_and_post}
+  #       && $form->{second_run}
+  #       && ($form->{action} eq "display_form")) {
+  #     for (keys %$form) { $old_form->{$_} = $form->{$_} }
+  #     $old_form->{rowcount}++;
+  #
+  #     #$form->{rowcount}--;
+  #     #$form->{rowcount}--;
+  #
+  #     $form->{print_and_post} = 0;
+  #
+  #     &print_form($old_form);
+  #     exit;
+  #   }
+  #
+  #   $form->{action}   = "";
+  #   $form->{resubmit} = 0;
+  #
+  #   if ($form->{print_and_post} && !$form->{second_run}) {
+  #     $form->{second_run} = 1;
+  #     $form->{action}     = "display_form";
+  #     $form->{rowcount}--;
+  #     my $rowcount = $form->{rowcount};
+  #
+  #     # get pricegroups for parts
+  #     IS->get_pricegroups_for_parts(\%myconfig, \%$form);
+  #
+  #     # build up html code for prices_$i
+  #     set_pricegroup($rowcount);
+  #
+  #     $form->{resubmit} = 1;
+  #
+  #   }
   &form_header;
 
   $numrows    = ++$form->{rowcount};
   &form_header;
 
   $numrows    = ++$form->{rowcount};
@@ -1264,7 +1270,7 @@ sub print_options {
   $form->{DF}{ $form->{format} }   = "selected";
   $form->{OP}{ $form->{media} }    = "selected";
   $form->{SM}{ $form->{sendmode} } = "selected";
   $form->{DF}{ $form->{format} }   = "selected";
   $form->{OP}{ $form->{media} }    = "selected";
   $form->{SM}{ $form->{sendmode} } = "selected";
-  
+
   if ($form->{type} eq 'purchase_order') {
     $type = qq|<select name=formname>
            <option value=purchase_order $form->{PD}{purchase_order}>|
   if ($form->{type} eq 'purchase_order') {
     $type = qq|<select name=formname>
            <option value=purchase_order $form->{PD}{purchase_order}>|
@@ -1414,7 +1420,6 @@ sub print_options {
 sub print {
   $lxdebug->enter_sub();
 
 sub print {
   $lxdebug->enter_sub();
 
-
   # if this goes to the printer pass through
   if ($form->{media} eq 'printer' || $form->{media} eq 'queue') {
     $form->error($locale->text('Select postscript or PDF!'))
   # if this goes to the printer pass through
   if ($form->{media} eq 'printer' || $form->{media} eq 'queue') {
     $form->error($locale->text('Select postscript or PDF!'))
@@ -1585,15 +1590,15 @@ sub print_form {
     IS->invoice_details(\%myconfig, \%$form, $locale);
   }
 
     IS->invoice_details(\%myconfig, \%$form, $locale);
   }
 
-  # format global dates 
+  # format global dates
   map { $form->{$_} = $locale->date(\%myconfig, $form->{$_}, 1) }
     ("${inv}date", "${due}date", "shippingdate", "deliverydate");
 
   # format item dates
   for my $field (qw(transdate_oe deliverydate_oe)) {
   map { $form->{$_} = $locale->date(\%myconfig, $form->{$_}, 1) }
     ("${inv}date", "${due}date", "shippingdate", "deliverydate");
 
   # format item dates
   for my $field (qw(transdate_oe deliverydate_oe)) {
-    map { 
-      $form->{$field}[$_] = $locale->date(\%myconfig, $form->{$field}[$_], 1); 
-    } 0..$#{$form->{$field}};
+    map {
+      $form->{$field}[$_] = $locale->date(\%myconfig, $form->{$field}[$_], 1);
+    } 0 .. $#{ $form->{$field} };
   }
 
   @a = qw(name street zipcode city country);
   }
 
   @a = qw(name street zipcode city country);
index 3e77049..7bbcc12 100644 (file)
@@ -59,7 +59,7 @@ sub add {
   }
   &invoice_links;
   &prepare_invoice;
   }
   &invoice_links;
   &prepare_invoice;
-  $form->{format} ="pdf";
+  $form->{format} = "pdf";
 
   &display_form;
 
 
   &display_form;
 
@@ -76,7 +76,7 @@ sub edit {
     $form->error("Access Denied");
   }
   if ($form->{print_and_post}) {
     $form->error("Access Denied");
   }
   if ($form->{print_and_post}) {
-    $form->{action}     = "print";
+    $form->{action}   = "print";
     $form->{resubmit} = 1;
   }
   &invoice_links;
     $form->{resubmit} = 1;
   }
   &invoice_links;
@@ -342,9 +342,12 @@ sub form_header {
 
     #write Trigger
     $jsscript =
 
     #write Trigger
     $jsscript =
-      Form->write_trigger(\%myconfig, "3", "invdate",      "BL", "trigger1",
-                                           "duedate",      "BL", "trigger2",
-                                           "deliverydate", "BL", "trigger3");
+      Form->write_trigger(\%myconfig,     "3",
+                          "invdate",      "BL",
+                          "trigger1",     "duedate",
+                          "BL",           "trigger2",
+                          "deliverydate", "BL",
+                          "trigger3");
   } else {
 
     # without JavaScript Calendar
   } else {
 
     # without JavaScript Calendar
@@ -354,8 +357,9 @@ sub form_header {
       qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
   }
   if ($form->{resubmit} && ($form->{format} eq "html")) {
       qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate}></td>|;
   }
   if ($form->{resubmit} && ($form->{format} eq "html")) {
-    $onload = qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
-  } elsif($form->{resubmit}) {
+    $onload =
+      qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|;
+  } elsif ($form->{resubmit}) {
     $onload = qq|document.invoice.submit()|;
   } else {
     $onload = "fokus()";
     $onload = qq|document.invoice.submit()|;
   } else {
     $onload = "fokus()";
@@ -1083,7 +1087,7 @@ sub post {
 
   # get new invnumber in sequence if no invnumber is given or if posasnew was requested
   if (!$form->{invnumber} || $form->{postasnew}) {
 
   # get new invnumber in sequence if no invnumber is given or if posasnew was requested
   if (!$form->{invnumber} || $form->{postasnew}) {
-    $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber")
+    $form->{invnumber} = $form->update_defaults(\%myconfig, "invnumber");
   }
   if ($print_post) {
     if (!(IS->post_invoice(\%myconfig, \%$form))) {
   }
   if ($print_post) {
     if (!(IS->post_invoice(\%myconfig, \%$form))) {
index fab414c..23dfa2a 100644 (file)
@@ -107,9 +107,7 @@ print qq|
 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
        <tr>
                <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
        <tr>
                <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
-  . $login
-  . $datum
-  . qq| <script>writeclock()</script>&nbsp;
+  . $login . $datum . qq| <script>writeclock()</script>&nbsp;
                </td>
        </tr>
 </table>
                </td>
        </tr>
 </table>
index 300673a..52e5e4f 100644 (file)
@@ -87,8 +87,7 @@ sub print_part_selection {
 <table width=100%>
   <tr>
     <th class=listtop colspan=5>|
 <table width=100%>
   <tr>
     <th class=listtop colspan=5>|
-      . $locale->text('Select from one of the items below')
-      . qq|</th>
+      . $locale->text('Select from one of the items below') . qq|</th>
   </tr>
   <tr height="5"></tr>
   <tr class=listheading>
   </tr>
   <tr height="5"></tr>
   <tr class=listheading>
@@ -111,13 +110,9 @@ sub print_part_selection {
       qq|<tr class=listrow$j>
       <td><input name=ndx class=radio type=radio value=$i $checked></td>
       <td><input name=\"new_partnumber_$i\" type=hidden value=\"|
       qq|<tr class=listrow$j>
       <td><input name=ndx class=radio type=radio value=$i $checked></td>
       <td><input name=\"new_partnumber_$i\" type=hidden value=\"|
-        . $p{"partnumber"} . qq|\">|
-        . $p{"partnumber"}
-        . qq|</td>
+        . $p{"partnumber"} . qq|\">| . $p{"partnumber"} . qq|</td>
       <td><input name=\"new_description_$i\" type=hidden value=\"|
       <td><input name=\"new_description_$i\" type=hidden value=\"|
-        . $p{"description"} . qq|\">|
-        . $p{"description"}
-        . qq|</td>
+        . $p{"description"} . qq|\">| . $p{"description"} . qq|</td>
       <input name=\"new_parts_id_$i\" type=hidden value=\"| . $p{"id"} . qq|\">
     </tr>|);
 
       <input name=\"new_parts_id_$i\" type=hidden value=\"| . $p{"id"} . qq|\">
     </tr>|);
 
@@ -145,8 +140,7 @@ sub print_customer_selection {
 <table width=100%>
   <tr>
     <th class=listtop colspan=5>|
 <table width=100%>
   <tr>
     <th class=listtop colspan=5>|
-      . $locale->text('Select from one of the names below')
-      . qq|</th>
+      . $locale->text('Select from one of the names below') . qq|</th>
   </tr>
   <tr height="5"></tr>
   <tr class=listheading>
   </tr>
   <tr height="5"></tr>
   <tr class=listheading>
@@ -174,11 +168,9 @@ sub print_customer_selection {
       qq|<tr class=listrow$j>
           <td><input name=ndx class=radio type=radio value=$i $checked></td>
           <td><input name=\"new_customer_id_$i\" type=hidden value=\"|
       qq|<tr class=listrow$j>
           <td><input name=ndx class=radio type=radio value=$i $checked></td>
           <td><input name=\"new_customer_id_$i\" type=hidden value=\"|
-        . $c{"id"}
-        . qq|\">$c{"customernumber"}</td>
+        . $c{"id"} . qq|\">$c{"customernumber"}</td>
           <td><input name=\"new_customer_name_$i\" type=hidden value=\"|
           <td><input name=\"new_customer_name_$i\" type=hidden value=\"|
-        . $c{"name"}
-        . qq|\">$c{"name"}</td>
+        . $c{"name"} . qq|\">$c{"name"}</td>
           <td>$c{"street"}</td>
           <td>$c{"zipcode"}</td>
           <td>$c{"city"}</td>
           <td>$c{"street"}</td>
           <td>$c{"zipcode"}</td>
           <td>$c{"city"}</td>
@@ -211,14 +203,12 @@ sub print_license_form {
       <tr>
         <th align=right>| . $locale->text('Part Number') . qq|</th>
         <td><input name=partnumber value=\"|
       <tr>
         <th align=right>| . $locale->text('Part Number') . qq|</th>
         <td><input name=partnumber value=\"|
-      . quot($form->{"partnumber"})
-      . qq|\"></td>
+      . quot($form->{"partnumber"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Description') . qq|</th>
         <td><input name=description value=\"|
       </tr>
       <tr>
         <th align=right>| . $locale->text('Description') . qq|</th>
         <td><input name=description value=\"|
-      . quot($form->{"description"})
-      . qq|\"></td>
+      . quot($form->{"description"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Company Name') . qq|</th>|);
       </tr>
       <tr>
         <th align=right>| . $locale->text('Company Name') . qq|</th>|);
@@ -242,26 +232,22 @@ sub print_license_form {
       <tr>
         <th align=right>| . $locale->text('Comment') . qq|</th>
         <td><input name=comment value=\"|
       <tr>
         <th align=right>| . $locale->text('Comment') . qq|</th>
         <td><input name=comment value=\"|
-      . quot($form->{"comment"})
-      . qq|\"></td>
+      . quot($form->{"comment"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Valid until') . qq|</th>
         <td><input name=validuntil value=\"|
       </tr>
       <tr>
         <th align=right>| . $locale->text('Valid until') . qq|</th>
         <td><input name=validuntil value=\"|
-      . quot($form->{"validuntil"})
-      . qq|\"></td>
+      . quot($form->{"validuntil"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Quantity') . qq|</th>
         <td><input name=quantity value=\"|
       </tr>
       <tr>
         <th align=right>| . $locale->text('Quantity') . qq|</th>
         <td><input name=quantity value=\"|
-      . quot($form->{"quantity"})
-      . qq|\"></td>
+      . quot($form->{"quantity"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('License key') . qq|</th>
         <td><input name=licensenumber value=\"|
       </tr>
       <tr>
         <th align=right>| . $locale->text('License key') . qq|</th>
         <td><input name=licensenumber value=\"|
-      . quot($form->{"licensenumber"})
-      . qq|\"></td>
+      . quot($form->{"licensenumber"}) . qq|\"></td>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Own Product') . qq|</th>
       </tr>
       <tr>
         <th align=right>| . $locale->text('Own Product') . qq|</th>
@@ -276,8 +262,7 @@ sub print_license_form {
     print(
       qq|&nbsp;
           <input type=submit name=action value=\"|
     print(
       qq|&nbsp;
           <input type=submit name=action value=\"|
-        . $locale->text('Save')
-        . qq|\">\n|);
+        . $locale->text('Save') . qq|\">\n|);
   }
   print(
     qq|
   }
   print(
     qq|
@@ -291,7 +276,8 @@ sub add {
   $lxdebug->enter_sub();
   if (!$lizenzen) {
     $form->error(
   $lxdebug->enter_sub();
   if (!$lizenzen) {
     $form->error(
-                 $locale->text('The licensing module has been deactivated in lx-erp.conf.')
+                 $locale->text(
+                   'The licensing module has been deactivated in lx-erp.conf.')
     );
   }
 
     );
   }
 
@@ -487,8 +473,7 @@ sub search {
       . $locale->text('Expiring in x month(s)')
       . qq|&nbsp;<input size=4 name=expiring_in value="1"><br>
         <input type=checkbox name=show_expired value=1>|
       . $locale->text('Expiring in x month(s)')
       . qq|&nbsp;<input size=4 name=expiring_in value="1"><br>
         <input type=checkbox name=show_expired value=1>|
-      . $locale->text('Expired licenses')
-      . qq|</td>
+      . $locale->text('Expired licenses') . qq|</td>
       </tr>
     </table>
   </tr>
       </tr>
     </table>
   </tr>
@@ -542,7 +527,8 @@ sub do_search {
         |);
   if (scalar(@{ $form->{"licenses"} }) == 0) {
     print(qq|</table>|
         |);
   if (scalar(@{ $form->{"licenses"} }) == 0) {
     print(qq|</table>|
-            . $locale->text("No licenses were found that match the search criteria.")
+            . $locale->text(
+                      "No licenses were found that match the search criteria.")
             . qq|</body></html>|);
     exit(0);
   }
             . qq|</body></html>|);
     exit(0);
   }
@@ -561,9 +547,7 @@ sub do_search {
       . $locale->text('Description')
       . qq|</a></th>
         <th class=listtop><a class=listheading href=\"|
       . $locale->text('Description')
       . qq|</a></th>
         <th class=listtop><a class=listheading href=\"|
-      . $columns{"name"} . "\">"
-      . $locale->text('Company Name')
-      . qq|</a></th>
+      . $columns{"name"} . "\">" . $locale->text('Company Name') . qq|</a></th>
         <th class=listtop><a class=listheading href=\"|
       . $columns{"validuntil"} . "\">"
       . $locale->text('Valid until')
         <th class=listtop><a class=listheading href=\"|
       . $columns{"validuntil"} . "\">"
       . $locale->text('Valid until')
index 64a1f58..57b2e02 100644 (file)
@@ -152,9 +152,7 @@ function clockon() {
 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
        <tr>
                <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
 <table border="0" width="100%" background="image/bg_titel.gif" cellpadding="0" cellspacing="0">
        <tr>
                <td align="right" style="vertical-align:middle; color:white; font-family:verdana,arial,sans-serif; font-size: 12px;" nowrap>|
-    . $login
-    . $datum
-    . qq| <script>writeclock()</script>&nbsp;
+    . $login . $datum . qq| <script>writeclock()</script>&nbsp;
                </td>
        </tr>
 </table>
                </td>
        </tr>
 </table>
index d05745b..baa041f 100644 (file)
@@ -79,8 +79,9 @@ sub edit {
 
   # editing without stuff to edit? try adding it first
   if ($form->{rowcount}) {
 
   # editing without stuff to edit? try adding it first
   if ($form->{rowcount}) {
-    map {$id++ if $form->{"id_$_"}} (1 .. $form->{rowcount});
+    map { $id++ if $form->{"id_$_"} } (1 .. $form->{rowcount});
     if (!$id) {
     if (!$id) {
+
       # reset rowcount
       undef $form->{rowcount};
       &add;
       # reset rowcount
       undef $form->{rowcount};
       &add;
@@ -131,18 +132,24 @@ sub order_links {
   # retrieve order/quotation
   $form->{webdav} = $webdav;
 
   # retrieve order/quotation
   $form->{webdav} = $webdav;
 
-
   # set jscalendar
   $form->{jscalendar} = $jscalendar;
 
   OE->retrieve(\%myconfig, \%$form);
 
   # if multiple rowcounts (== collective order) then check if the
   # set jscalendar
   $form->{jscalendar} = $jscalendar;
 
   OE->retrieve(\%myconfig, \%$form);
 
   # if multiple rowcounts (== collective order) then check if the
-  # there were more than one customer (in that case OE::retrieve removes 
+  # there were more than one customer (in that case OE::retrieve removes
   # the content from the field)
   # the content from the field)
-  if ($form->{rowcount} && $form->{type} eq 'sales_order' && defined $form->{customer} && $form->{customer} eq '') {
-#    $main::lxdebug->message(0, "Detected Edit order with concurrent customers");
-    $form->error($locale->text('Collective Orders only work for orders from one customer!'));
+  if (   $form->{rowcount}
+      && $form->{type} eq 'sales_order'
+      && defined $form->{customer}
+      && $form->{customer} eq '') {
+
+    #    $main::lxdebug->message(0, "Detected Edit order with concurrent customers");
+    $form->error(
+                 $locale->text(
+                   'Collective Orders only work for orders from one customer!')
+    );
   }
 
   $taxincluded = $form->{taxincluded};
   }
 
   $taxincluded = $form->{taxincluded};
@@ -221,40 +228,42 @@ sub prepare_order {
   $form->{media}    = "screen";
   $form->{formname} = $form->{type};
 
   $form->{media}    = "screen";
   $form->{formname} = $form->{type};
 
-    map { $form->{$_} =~ s/\"/&quot;/g }
-      qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact);
+  map { $form->{$_} =~ s/\"/&quot;/g }
+    qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact);
 
 
-    foreach $ref (@{ $form->{form_details} }) {
-      $form->{rowcount} = ++$i;
+  foreach $ref (@{ $form->{form_details} }) {
+    $form->{rowcount} = ++$i;
 
 
-      map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
-    }
-    for my $i (1 .. $form->{rowcount}) {
-      if ($form->{id}) {
-        $form->{"discount_$i"} =
-          $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
-      } else {
-        $form->{"discount_$i"} =
-          $form->format_amount(\%myconfig, $form->{"discount_$i"});
-      }
-      ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);    
-      $dec           = length $dec;
-      $decimalplaces = ($dec > 2) ? $dec : 2;
-
-      # copy reqdate from deliverydate for invoice -> order conversion
-      $form->{"reqdate_$i"} = $form->{"deliverydate_$i"} unless $form->{"reqdate_$i"};
-
-      $form->{"sellprice_$i"} =
-        $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
-                            $decimalplaces);
-      
-      (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
-      $dec_qty      = length $dec_qty;
-      $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
-
-      map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
-        qw(partnumber description unit);
+    map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref};
+  }
+  for my $i (1 .. $form->{rowcount}) {
+    if ($form->{id}) {
+      $form->{"discount_$i"} =
+        $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100);
+    } else {
+      $form->{"discount_$i"} =
+        $form->format_amount(\%myconfig, $form->{"discount_$i"});
     }
     }
+    ($dec) = ($form->{"sellprice_$i"} =~ /\.(\d+)/);
+    $dec           = length $dec;
+    $decimalplaces = ($dec > 2) ? $dec : 2;
+
+    # copy reqdate from deliverydate for invoice -> order conversion
+    $form->{"reqdate_$i"} = $form->{"deliverydate_$i"}
+      unless $form->{"reqdate_$i"};
+
+    $form->{"sellprice_$i"} =
+      $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
+                           $decimalplaces);
+
+    (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+    $dec_qty = length $dec_qty;
+    $form->{"qty_$i"} =
+      $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+
+    map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
+      qw(partnumber description unit);
+  }
 
   $lxdebug->leave_sub();
 }
 
   $lxdebug->leave_sub();
 }
@@ -883,7 +892,6 @@ Bearbeiten des $form->{heading}<br>
       . $locale->text('Invoice') . qq|">
 |;
   }
       . $locale->text('Invoice') . qq|">
 |;
   }
-  
 
   if ($form->{menubar}) {
     require "$form->{path}/menu.pl";
 
   if ($form->{menubar}) {
     require "$form->{path}/menu.pl";
@@ -983,6 +991,7 @@ sub update {
         } else {
 
           $form->{"sellprice_$i"} *= (1 - $form->{tradediscount});
         } else {
 
           $form->{"sellprice_$i"} *= (1 - $form->{tradediscount});
+
           # if there is an exchange rate adjust sellprice
           $form->{"sellprice_$i"} /= $exchangerate;
         }
           # if there is an exchange rate adjust sellprice
           $form->{"sellprice_$i"} /= $exchangerate;
         }
@@ -1036,7 +1045,6 @@ sub update {
     }
   }
 
     }
   }
 
-
   $lxdebug->leave_sub();
 }
 
   $lxdebug->leave_sub();
 }
 
@@ -1515,7 +1523,8 @@ sub orders {
     $subtotalnetamount += $oe->{netamount};
     $subtotalamount    += $oe->{amount};
 
     $subtotalnetamount += $oe->{netamount};
     $subtotalamount    += $oe->{amount};
 
-    $column_data{ids}    = qq|<td><input name="id_$j" class=checkbox type=checkbox><input type="hidden" name="trans_id_$j" value="$oe->{id}"></td>|;
+    $column_data{ids} =
+      qq|<td><input name="id_$j" class=checkbox type=checkbox><input type="hidden" name="trans_id_$j" value="$oe->{id}"></td>|;
     $column_data{id}        = "<td>$oe->{id}</td>";
     $column_data{transdate} = "<td>$oe->{transdate}&nbsp;</td>";
     $column_data{reqdate}   = "<td>$oe->{reqdate}&nbsp;</td>";
     $column_data{id}        = "<td>$oe->{id}</td>";
     $column_data{transdate} = "<td>$oe->{transdate}&nbsp;</td>";
     $column_data{reqdate}   = "<td>$oe->{reqdate}&nbsp;</td>";
@@ -1581,13 +1590,13 @@ sub orders {
   </tr>
 </table>|;
 
   </tr>
 </table>|;
 
-# multiple invoice edit button only if gotten there via sales_order form.
+  # multiple invoice edit button only if gotten there via sales_order form.
 
 
-if ($form->{type} =~ /sales_order/) {
-print qq|
+  if ($form->{type} =~ /sales_order/) {
+    print qq|
   <input type="hidden" name="path" value="$form->{path}">
   <input class"submit" type="submit" name="action" value="|
   <input type="hidden" name="path" value="$form->{path}">
   <input class"submit" type="submit" name="action" value="|
-. $locale->text('Continue') .qq|">
+      . $locale->text('Continue') . qq|">
   <input type="hidden" name="nextsub" value="edit">
   <input type="hidden" name="type" value="$form->{type}">
   <input type="hidden" name="warehouse" value="$warehouse">
   <input type="hidden" name="nextsub" value="edit">
   <input type="hidden" name="type" value="$form->{type}">
   <input type="hidden" name="warehouse" value="$warehouse">
@@ -1596,9 +1605,9 @@ print qq|
   <input type="hidden" name="password" value="$form->{password}">
   <input type="hidden" name="callback" value="$callback">
   <input type="hidden" name="rowcount" value="$form->{rowcount}">|;
   <input type="hidden" name="password" value="$form->{password}">
   <input type="hidden" name="callback" value="$callback">
   <input type="hidden" name="rowcount" value="$form->{rowcount}">|;
-}
+  }
 
 
-print qq|
+  print qq|
 </form>
 
 <br>
 </form>
 
 <br>
@@ -1804,10 +1813,15 @@ sub invoice {
   $lxdebug->enter_sub();
 
   if ($form->{type} =~ /_order$/) {
   $lxdebug->enter_sub();
 
   if ($form->{type} =~ /_order$/) {
+
     # these checks only apply if the items don't bring their own ordnumbers/transdates.
     # The if clause ensures that by searching for empty ordnumber_#/transdate_# fields.
     # these checks only apply if the items don't bring their own ordnumbers/transdates.
     # The if clause ensures that by searching for empty ordnumber_#/transdate_# fields.
-    $form->isblank("ordnumber", $locale->text('Order Number missing!')) if ( +{ map { $form->{"ordnumber_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} );
-    $form->isblank("transdate", $locale->text('Order Date missing!'))   if ( +{ map { $form->{"transdate_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} );
+    $form->isblank("ordnumber", $locale->text('Order Number missing!'))
+      if (+{ map { $form->{"ordnumber_$_"}, 1 } (1 .. $form->{rowcount} - 1) }
+          ->{''});
+    $form->isblank("transdate", $locale->text('Order Date missing!'))
+      if (+{ map { $form->{"transdate_$_"}, 1 } (1 .. $form->{rowcount} - 1) }
+          ->{''});
 
     # also copy deliverydate from the order
     $form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
 
     # also copy deliverydate from the order
     $form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
@@ -1846,7 +1860,7 @@ sub invoice {
   # close orders/quotations
   $form->{closed} = 1;
 
   # close orders/quotations
   $form->{closed} = 1;
 
-  # save order if one ordnumber has been given 
+  # save order if one ordnumber has been given
   # if not it's most likely a collective order, which can't be saved back
   # so they just have to be closed
   if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) {
   # if not it's most likely a collective order, which can't be saved back
   # so they just have to be closed
   if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) {
@@ -1927,15 +1941,17 @@ sub invoice {
     $decimalplaces = ($dec > 2) ? $dec : 2;
 
     # copy delivery date from reqdate for order -> invoice conversion
     $decimalplaces = ($dec > 2) ? $dec : 2;
 
     # copy delivery date from reqdate for order -> invoice conversion
-    $form->{"deliverydate_$i"} = $form->{"reqdate_$i"} unless $form->{"deliverydate_$i"};
+    $form->{"deliverydate_$i"} = $form->{"reqdate_$i"}
+      unless $form->{"deliverydate_$i"};
 
     $form->{"sellprice_$i"} =
       $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
                            $decimalplaces);
 
     $form->{"sellprice_$i"} =
       $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
                            $decimalplaces);
-    
+
     (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
     (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
-      $dec_qty      = length $dec_qty;
-    $form->{"qty_$i"} = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
+    $dec_qty = length $dec_qty;
+    $form->{"qty_$i"} =
+      $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
 
     map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
       qw(partnumber description unit);
 
     map { $form->{"${_}_$i"} =~ s/\"/&quot;/g }
       qw(partnumber description unit);
index 9dfb1e1..2a17429 100644 (file)
@@ -298,11 +298,10 @@ sub display_form {
   $clearedbalance = $form->format_amount(\%myconfig, $clearedbalance, 2, 0);
 
   if ($fx) {
   $clearedbalance = $form->format_amount(\%myconfig, $clearedbalance, 2, 0);
 
   if ($fx) {
-    $fx = $form->format_amount(\%myconfig, $fx, 2, 0);
+    $fx       = $form->format_amount(\%myconfig, $fx, 2, 0);
     $exchdiff = qq|
                <th align=right nowrap>|
     $exchdiff = qq|
                <th align=right nowrap>|
-      . $locale->text('Exchangerate Difference')
-      . qq|</th>
+      . $locale->text('Exchangerate Difference') . qq|</th>
                <td width=10%></td>
                <td align=right>$fx</td>
 |;
                <td width=10%></td>
                <td align=right>$fx</td>
 |;
index 32ec6ef..34b1284 100644 (file)
@@ -269,8 +269,7 @@ sub report {
          <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Heading') . qq|
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
          <td><input name=l_heading class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Heading') . qq|
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
-      . $locale->text('Subtotal')
-      . qq|</td>
+      . $locale->text('Subtotal') . qq|</td>
        </tr>
 
 $jsscript
        </tr>
 
 $jsscript
@@ -288,14 +287,12 @@ $jsscript
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
-      . $locale->text('Customized Report')
-      . qq|</th>
+      . $locale->text('Customized Report') . qq|</th>
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
-      . $locale->text('YYYY')
-      . qq|" value="$year"></td>
+      . $locale->text('YYYY') . qq|" value="$year"></td>
        </tr>
 |;
 
        </tr>
 |;
 
@@ -310,70 +307,54 @@ $jsscript
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 "checked"></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 "checked"></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
-      . $locale->text('January')
-      . qq|</td>
+      . $locale->text('January') . qq|</td>
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
-      . $locale->text('May')
-      . qq|</td>
+      . $locale->text('May') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
-      . $locale->text('September')
-      . qq|</td>
+      . $locale->text('September') . qq|</td>
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
-      . $locale->text('February')
-      . qq|</td>
+      . $locale->text('February') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
-      . $locale->text('June')
-      . qq|</td>
+      . $locale->text('June') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
-      . $locale->text('October')
-      . qq|</td>
+      . $locale->text('October') . qq|</td>
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
-      . $locale->text('March')
-      . qq|</td>
+      . $locale->text('March') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
-      . $locale->text('July')
-      . qq|</td>
+      . $locale->text('July') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
-      . $locale->text('November')
-      . qq|</td>
+      . $locale->text('November') . qq|</td>
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
-      . $locale->text('Quarter')
-      . qq|&nbsp;</td>
+      . $locale->text('Quarter') . qq|&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
-      . $locale->text('April')
-      . qq|</td>
+      . $locale->text('April') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
-      . $locale->text('August')
-      . qq|</td>
+      . $locale->text('August') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
-      . $locale->text('December')
-      . qq|</td>
+      . $locale->text('December') . qq|</td>
 
        </tr>
        <tr>
 
        </tr>
        <tr>
@@ -381,8 +362,7 @@ $jsscript
        </tr>
        <tr>
           <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
        </tr>
        <tr>
           <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
-      . $locale->text('Free report period')
-      . qq|</th>
+      . $locale->text('Free report period') . qq|</th>
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
              $button1
               $button1_2&nbsp;
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
              $button1
               $button1_2&nbsp;
@@ -399,8 +379,7 @@ $jsscript
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
 
 $jsscript
        </tr>
 
 $jsscript
@@ -418,14 +397,12 @@ $jsscript
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
-      . $locale->text('Customized Report')
-      . qq|</th>
+      . $locale->text('Customized Report') . qq|</th>
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
-      . $locale->text('YYYY')
-      . qq|" value="$year"></td>
+      . $locale->text('YYYY') . qq|" value="$year"></td>
        </tr>
 |;
 
        </tr>
 |;
 
@@ -440,70 +417,54 @@ $jsscript
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 $checked></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 $checked></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
 |;
     $checked = "checked";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
 |;
     $checked = "checked";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
-      . $locale->text('January')
-      . qq|</td>
+      . $locale->text('January') . qq|</td>
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
-      . $locale->text('May')
-      . qq|</td>
+      . $locale->text('May') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
-      . $locale->text('September')
-      . qq|</td>
+      . $locale->text('September') . qq|</td>
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
-      . $locale->text('February')
-      . qq|</td>
+      . $locale->text('February') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
-      . $locale->text('June')
-      . qq|</td>
+      . $locale->text('June') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
-      . $locale->text('October')
-      . qq|</td>
+      . $locale->text('October') . qq|</td>
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
-      . $locale->text('March')
-      . qq|</td>
+      . $locale->text('March') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
-      . $locale->text('July')
-      . qq|</td>
+      . $locale->text('July') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
-      . $locale->text('November')
-      . qq|</td>
+      . $locale->text('November') . qq|</td>
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
-      . $locale->text('Quarter')
-      . qq|&nbsp;</td>
+      . $locale->text('Quarter') . qq|&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
-      . $locale->text('April')
-      . qq|</td>
+      . $locale->text('April') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
-      . $locale->text('August')
-      . qq|</td>
+      . $locale->text('August') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
-      . $locale->text('December')
-      . qq|</td>
+      . $locale->text('December') . qq|</td>
 
        </tr>
        <tr>
 
        </tr>
        <tr>
@@ -511,8 +472,7 @@ $checked></td>
        </tr>
        <tr>
           <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
        </tr>
        <tr>
           <th align=left><input name=reporttype class=radio type=radio value="free" $checked> |
-      . $locale->text('Free report period')
-      . qq|</th>
+      . $locale->text('Free report period') . qq|</th>
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
              $button1
               $button1_2&nbsp;
          <td align=left colspan=4>| . $locale->text('From') . qq|&nbsp;
              $button1
               $button1_2&nbsp;
@@ -529,11 +489,12 @@ $checked></td>
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
         <tr>
        </tr>
         <tr>
-         <th align=right colspan=4>| . $locale->text('Decimalplaces') . qq|</th>
+         <th align=right colspan=4>|
+      . $locale->text('Decimalplaces')
+      . qq|</th>
              <td><input name=decimalplaces size=3></td>
          </tr>
                                     
              <td><input name=decimalplaces size=3></td>
          </tr>
                                     
@@ -551,14 +512,12 @@ $jsscript
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
 <table>
        <tr>
          <th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
-      . $locale->text('Zeitraum')
-      . qq|</th>
+      . $locale->text('Zeitraum') . qq|</th>
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
        </tr>
        <tr>
          <th colspan=1>| . $locale->text('Year') . qq|</th>
          <td><input name=year size=11 title="|
-      . $locale->text('YYYY')
-      . qq|" value="$year"></td>
+      . $locale->text('YYYY') . qq|" value="$year"></td>
        </tr>
 |;
 
        </tr>
 |;
 
@@ -573,70 +532,54 @@ $jsscript
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 $checked></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
                <td align=right>&nbsp; <input name=duetyp class=radio type=radio value="13"
 $checked></td>
                <td><input name=duetyp class=radio type=radio value="A" $checked >&nbsp;1. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
 |;
     $checked = "checked";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
 |;
     $checked = "checked";
     print qq|
                <td><input name=duetyp class=radio type=radio value="1" $checked >&nbsp;|
-      . $locale->text('January')
-      . qq|</td>
+      . $locale->text('January') . qq|</td>
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
 |;
     $checked = "";
     print qq|
                <td><input name=duetyp class=radio type=radio value="5" $checked >&nbsp;|
-      . $locale->text('May')
-      . qq|</td>
+      . $locale->text('May') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="9" $checked >&nbsp;|
-      . $locale->text('September')
-      . qq|</td>
+      . $locale->text('September') . qq|</td>
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
 
        </tr>
        <tr>
                <td align= right>&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="B" $checked>&nbsp;2. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="2" $checked >&nbsp;|
-      . $locale->text('February')
-      . qq|</td>
+      . $locale->text('February') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="6" $checked >&nbsp;|
-      . $locale->text('June')
-      . qq|</td>
+      . $locale->text('June') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="10" $checked >&nbsp;|
-      . $locale->text('October')
-      . qq|</td>
+      . $locale->text('October') . qq|</td>
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="C" $checked>&nbsp;3. |
-      . $locale->text('Quarter')
-      . qq|</td>
+      . $locale->text('Quarter') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="3" $checked >&nbsp;|
-      . $locale->text('March')
-      . qq|</td>
+      . $locale->text('March') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="7" $checked >&nbsp;|
-      . $locale->text('July')
-      . qq|</td>
+      . $locale->text('July') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="11" $checked >&nbsp;|
-      . $locale->text('November')
-      . qq|</td>
+      . $locale->text('November') . qq|</td>
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
 
        </tr>
        <tr>
                <td> &nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="D" $checked>&nbsp;4. |
-      . $locale->text('Quarter')
-      . qq|&nbsp;</td>
+      . $locale->text('Quarter') . qq|&nbsp;</td>
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="4" $checked >&nbsp;|
-      . $locale->text('April')
-      . qq|</td>
+      . $locale->text('April') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="8" $checked >&nbsp;|
-      . $locale->text('August')
-      . qq|</td>
+      . $locale->text('August') . qq|</td>
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
                <td><input name=duetyp class=radio type=radio value="12" $checked >&nbsp;|
-      . $locale->text('December')
-      . qq|</td>
+      . $locale->text('December') . qq|</td>
 
        </tr>
        <tr>
 
        </tr>
        <tr>
@@ -647,8 +590,7 @@ $checked></td>
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
        <tr>
          <th colspan=4>|;
        </tr>
        <tr>
          <th colspan=4>|;
@@ -691,8 +633,7 @@ $checked></td>
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
 
        <tr>
        </tr>
 
        <tr>
@@ -702,8 +643,7 @@ $checked></td>
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Subtotal') . qq|
          <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;|
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Subtotal') . qq|
          <input name=l_accno class=checkbox type=checkbox value=Y>&nbsp;|
-      . $locale->text('Account Number')
-      . qq|</td>
+      . $locale->text('Account Number') . qq|</td>
        </tr>
 
 $jsscript
        </tr>
 
 $jsscript
@@ -739,8 +679,7 @@ $jsscript
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Subtotal') . qq|
          <input name=all_accounts class=checkbox type=checkbox value=Y>&nbsp;|
          <input name=l_subtotal class=checkbox type=checkbox value=Y>&nbsp;|
       . $locale->text('Subtotal') . qq|
          <input name=all_accounts class=checkbox type=checkbox value=Y>&nbsp;|
-      . $locale->text('All Accounts')
-      . qq|</td>
+      . $locale->text('All Accounts') . qq|</td>
        </tr>
 
 $jsscript
        </tr>
 
 $jsscript
@@ -817,8 +756,7 @@ $jsscript
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
       </table>
     </td>
        </tr>
       </table>
     </td>
@@ -891,8 +829,7 @@ $jsscript
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
          <td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
       . $locale->text('Accrual') . qq|
          &nbsp;<input name=method class=radio type=radio value=cash $cash>|
-      . $locale->text('EUR')
-      . qq|</td>
+      . $locale->text('EUR') . qq|</td>
        </tr>
         <tr>
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
        </tr>
         <tr>
          <th align=right>| . $locale->text('Include in Report') . qq|</th>
@@ -1034,8 +971,7 @@ $jsscript
         <tr>
          <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
          <th align=left colspan=3>|
         <tr>
          <td align=right><input type=checkbox style=checkbox name=fx_transaction value=1 checked></td>
          <th align=left colspan=3>|
-      . $locale->text('Include Exchangerate Difference')
-      . qq|</td>
+      . $locale->text('Include Exchangerate Difference') . qq|</td>
        </tr>
 
 $jsscript
        </tr>
 
 $jsscript
index 2e42f18..4ee7638 100644 (file)
@@ -76,7 +76,11 @@ sub report {
   $form->{title} = $locale->text('UStVA');
   $form->{kz10}  = '';                       #Berichtigte Anmeldung? Ja =1
 
   $form->{title} = $locale->text('UStVA');
   $form->{kz10}  = '';                       #Berichtigte Anmeldung? Ja =1
 
-  my $year = substr($form->datetonum($form->current_date(\%myconfig), \%myconfig),0,4);
+  my $year = substr(
+                    $form->datetonum($form->current_date(\%myconfig),
+                                     \%myconfig
+                    ),
+                    0, 4);
 
   my $department = '';
   local $hide = '';
 
   my $department = '';
   local $hide = '';
@@ -103,7 +107,7 @@ sub report {
   # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
   # Einlesen der Finanzamtdaten
   &get_config($userspath, 'finanzamt.ini');
   # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
   # Einlesen der Finanzamtdaten
   &get_config($userspath, 'finanzamt.ini');
-  
+
   # Hier Einlesen der user-config
   # steuernummer entfernt für prerelease
   my @a = qw(signature name company address businessnumber tel fax email
   # Hier Einlesen der user-config
   # steuernummer entfernt für prerelease
   my @a = qw(signature name company address businessnumber tel fax email
@@ -134,7 +138,7 @@ sub report {
            | . $locale->text('Kein Firmenname hinterlegt!') . qq|</a><br>
     |;
   }
            | . $locale->text('Kein Firmenname hinterlegt!') . qq|</a><br>
     |;
   }
-  
+
   # Anpassungen der Variablennamen auf pre 2.1.1 Namen
   # klären, ob $form->{company_street|_address} gesetzt sind
   #
   # Anpassungen der Variablennamen auf pre 2.1.1 Namen
   # klären, ob $form->{company_street|_address} gesetzt sind
   #
@@ -145,24 +149,24 @@ sub report {
     ($form->{co_street}, $form->{co_city}) = split("<br \/>", $temp);
   }
 
     ($form->{co_street}, $form->{co_city}) = split("<br \/>", $temp);
   }
 
-  if (    $form->{co_street} ne ''
-      and ($form->{co_zip} ne ''
-      or $form->{co_city} ne '') ) {
+  if ($form->{co_street} ne ''
+      and (   $form->{co_zip} ne ''
+           or $form->{co_city} ne '')
+    ) {
     print qq|
     $form->{co_street}<br>
     $form->{co_street1}<br>
     $form->{co_zip} $form->{co_city}|;
     print qq|
     $form->{co_street}<br>
     $form->{co_street1}<br>
     $form->{co_zip} $form->{co_city}|;
-      } else {
+    } else {
     print qq|
          <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
          | . $locale->text('Keine Firmenadresse hinterlegt!') . qq|</a>\n|;
   }
     print qq|
          <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
          | . $locale->text('Keine Firmenadresse hinterlegt!') . qq|</a>\n|;
   }
-  $form->{co_email}=$form->{email} unless $form->{co_email};
-  $form->{co_tel}=$form->{tel} unless $form->{co_tel};
-  $form->{co_fax}=$form->{fax} unless $form->{co_fax};
-  $form->{co_url}=$form->{urlx} unless $form->{co_url};
-  
-  
+  $form->{co_email} = $form->{email} unless $form->{co_email};
+  $form->{co_tel}   = $form->{tel}   unless $form->{co_tel};
+  $form->{co_fax}   = $form->{fax}   unless $form->{co_fax};
+  $form->{co_url}   = $form->{urlx}  unless $form->{co_url};
+
   print qq|
          <br>
          <br>
   print qq|
          <br>
          <br>
@@ -227,7 +231,7 @@ sub report {
 
     # accounting years if SQL-Ledger Version < 2.4.1
     #    $year = $form->{year} * 1;
 
     # accounting years if SQL-Ledger Version < 2.4.1
     #    $year = $form->{year} * 1;
-    @years = sort { $b <=> $a } (2003 .. ($year+1));
+    @years = sort { $b <=> $a } (2003 .. ($year + 1));
     $form->{all_years} = \@years;
   }
   map { $form->{selectaccountingyear} .= qq|<option>$_\n| }
     $form->{all_years} = \@years;
   }
   map { $form->{selectaccountingyear} .= qq|<option>$_\n| }
@@ -415,7 +419,9 @@ sub report {
      <legend>
      <b>| . $locale->text('Hinweise') . qq|</b>
      </legend>
      <legend>
      <b>| . $locale->text('Hinweise') . qq|</b>
      </legend>
-      <h2 class="confirm">| . $locale->text('Missing Preferences: Outputroutine disabled') . qq|</h2>
+      <h2 class="confirm">|
+      . $locale->text('Missing Preferences: Outputroutine disabled')
+      . qq|</h2>
       <h3>| . $locale->text('Help:') . qq|</h3>
       <ul>
       <li>| . $locale->text('Hint-Missing-Preferences') . qq|</li>
       <h3>| . $locale->text('Help:') . qq|</h3>
       <ul>
       <li>| . $locale->text('Hint-Missing-Preferences') . qq|</li>
@@ -482,6 +488,7 @@ sub report {
 
 sub help {
   $lxdebug->enter_sub();
 
 sub help {
   $lxdebug->enter_sub();
+
   # parse help documents under doc
   my $tmp = $form->{templates};
   $form->{templates} = 'doc';
   # parse help documents under doc
   my $tmp = $form->{templates};
   $form->{templates} = 'doc';
@@ -496,6 +503,7 @@ sub help {
 
 sub show {
   $lxdebug->enter_sub();
 
 sub show {
   $lxdebug->enter_sub();
+
   #&generate_ustva();
   no strict 'refs';
   $lxdebug->leave_sub();
   #&generate_ustva();
   no strict 'refs';
   $lxdebug->leave_sub();
@@ -505,6 +513,7 @@ sub show {
 
 sub ustva_vorauswahl {
   $lxdebug->enter_sub();
 
 sub ustva_vorauswahl {
   $lxdebug->enter_sub();
+
   #Aktuelles Datum zerlegen:
   my $date = $form->datetonum($form->current_date(\%myconfig), \%myconfig);
 
   #Aktuelles Datum zerlegen:
   my $date = $form->datetonum($form->current_date(\%myconfig), \%myconfig);
 
@@ -517,7 +526,7 @@ sub ustva_vorauswahl {
     Actual year from Database: $form->{year}\n
     Actual day from Database: $form->{day}\n
     Actual month from Database: $form->{month}\n|);
     Actual year from Database: $form->{year}\n
     Actual day from Database: $form->{day}\n
     Actual month from Database: $form->{month}\n|);
-  
+
   my $sel    = '';
   my $yymmdd = '';
 
   my $sel    = '';
   my $yymmdd = '';
 
@@ -552,15 +561,14 @@ sub ustva_vorauswahl {
                  '10' => 'October',
                  '11' => 'November',
                  '12' => 'December',
                  '10' => 'October',
                  '11' => 'November',
                  '12' => 'December',
-                 '13' => 'Yearly',
-                );
-       
+                 '13' => 'Yearly',);
+
     my $yy = $form->{year} * 10000;
     $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
     $yymmdd = 20060121;
     $sel    = '';
     my $yy = $form->{year} * 10000;
     $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
     $yymmdd = 20060121;
     $sel    = '';
-    my $dfv = '0';    
-    
+    my $dfv = '0';
+
     # Offset für Dauerfristverlängerung
     $dfv = '100' if ($form->{FA_dauerfrist} eq '1');
 
     # Offset für Dauerfristverlängerung
     $dfv = '100' if ($form->{FA_dauerfrist} eq '1');
 
@@ -626,8 +634,7 @@ sub ustva_vorauswahl {
       $selected = 'selected' if ($sel eq $key);
       print qq|
          <option value="$key" $selected>|
       $selected = 'selected' if ($sel eq $key);
       print qq|
          <option value="$key" $selected>|
-        . $locale->text("$liste{$key}")
-        . qq|</option>
+        . $locale->text("$liste{$key}") . qq|</option>
          
    |;
     }
          
    |;
     }
@@ -636,12 +643,11 @@ sub ustva_vorauswahl {
   } elsif ($form->{FA_voranmeld} eq 'quarter') {
 
     # Vorauswahl bei quartalsweisem Voranmeldungszeitraum
   } elsif ($form->{FA_voranmeld} eq 'quarter') {
 
     # Vorauswahl bei quartalsweisem Voranmeldungszeitraum
-    my %liste = ( 'A' => $locale->text('1. Quarter'),
-                  'B' => $locale->text('2. Quarter'),
-                  'C' => $locale->text('3. Quarter'),
-                  'D' => $locale->text('4. Quarter'),
-                 '13' => $locale->text('Yearly'),
-                 );
+    my %liste = ('A'  => $locale->text('1. Quarter'),
+                 'B'  => $locale->text('2. Quarter'),
+                 'C'  => $locale->text('3. Quarter'),
+                 'D'  => $locale->text('4. Quarter'),
+                 '13' => $locale->text('Yearly'),);
 
     my $yy = $form->{year} * 10000;
     $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
 
     my $yy = $form->{year} * 10000;
     $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1;
@@ -708,19 +714,20 @@ sub ustva_vorauswahl {
                   '10' => 'October',
                   '11' => 'November',
                   '12' => 'December',
                   '10' => 'October',
                   '11' => 'November',
                   '12' => 'December',
-                  '13' => 'Yearly',
-                  );
+                  '13' => 'Yearly',);
     my $key = '';
     foreach $key (sort keys %listea) {
       print qq|
     my $key = '';
     foreach $key (sort keys %listea) {
       print qq|
-         <option value="$key">| . $locale->text("$listea{$key}"). 
-         qq|</option>\n|;
+         <option value="$key">|
+        . $locale->text("$listea{$key}")
+        . qq|</option>\n|;
     }
 
     foreach $key (sort keys %listeb) {
       print qq|
     }
 
     foreach $key (sort keys %listeb) {
       print qq|
-         <option value="$key">| . $locale->text("$listeb{$key}"). 
-         qq|</option>\n|;
+         <option value="$key">|
+        . $locale->text("$listeb{$key}")
+        . qq|</option>\n|;
     }
     print qq|</select>|;
   }
     }
     print qq|</select>|;
   }
@@ -773,8 +780,7 @@ sub show_options {
     $type
     $media
     <select name=format title = "|
     $type
     $media
     <select name=format title = "|
-    . $locale->text('Ausgabeformat auswählen...')
-    . qq|">$format</select>
+    . $locale->text('Ausgabeformat auswählen...') . qq|">$format</select>
   |;
   $lxdebug->leave_sub();
 }
   |;
   $lxdebug->leave_sub();
 }
@@ -798,8 +804,13 @@ sub generate_ustva {
 
     #forgotten the year --> thisyear
     if ($form->{year} !~ m/^\d\d\d\d$/) {
 
     #forgotten the year --> thisyear
     if ($form->{year} !~ m/^\d\d\d\d$/) {
-      $form->{year} = substr($form->datetonum($form->current_date(\%myconfig), \%myconfig),0,4);
-      $lxdebug->message(LXDebug::DEBUG1, qq|Actual year from Database: $form->{year}\n|);
+      $form->{year} = substr(
+                             $form->datetonum(
+                                    $form->current_date(\%myconfig), \%myconfig
+                             ),
+                             0, 4);
+      $lxdebug->message(LXDebug::DEBUG1,
+                        qq|Actual year from Database: $form->{year}\n|);
     }
 
     #yearly report
     }
 
     #yearly report
@@ -912,17 +923,16 @@ sub generate_ustva {
 
   # using dates in ISO-8601 format: yyyymmmdd  for Postgres...
   USTVA->ustva(\%myconfig, \%$form);
 
   # using dates in ISO-8601 format: yyyymmmdd  for Postgres...
   USTVA->ustva(\%myconfig, \%$form);
-  
+
   # reformat Dates to dateformat
   # reformat Dates to dateformat
-  $form->{fromdate}= $locale->date(\%myconfig, $form->{fromdate}, 0, 0, 0);
-  
+  $form->{fromdate} = $locale->date(\%myconfig, $form->{fromdate}, 0, 0, 0);
+
   $form->{todate} = $form->current_date($myconfig) unless $form->{todate};
   $form->{todate} = $form->current_date($myconfig) unless $form->{todate};
-  $form->{todate}= $locale->date(\%myconfig, $form->{todate}, 0, 0, 0);
+  $form->{todate} = $locale->date(\%myconfig, $form->{todate}, 0, 0, 0);
 
   $form->{period} =
     $locale->date(\%myconfig, $form->current_date(\%myconfig), 1, 0, 0);
 
 
   $form->{period} =
     $locale->date(\%myconfig, $form->current_date(\%myconfig), 1, 0, 0);
 
-
   # if there are any dates construct a where
   if ($form->{fromdate} || $form->{todate}) {
 
   # if there are any dates construct a where
   if ($form->{fromdate} || $form->{todate}) {
 
@@ -989,27 +999,28 @@ sub generate_ustva {
     $form->{endbold} = "}";
     $form->{br}      = '\\\\';
 
     $form->{endbold} = "}";
     $form->{br}      = '\\\\';
 
-    
     my @numbers = qw(511 861 36 80 971 931 98 96 53 74
     my @numbers = qw(511 861 36 80 971 931 98 96 53 74
-                     85 65 66 61 62 Z67 63 64 59 69 39 83
-                     Z43 Z45 Z53 Z62 Z65);
-      
+      85 65 66 61 62 Z67 63 64 59 69 39 83
+      Z43 Z45 Z53 Z62 Z65);
+
     my $number = '';
     my $number = '';
+
     # Zahlenformatierung für Latex USTVA Formulare
     # Zahlenformatierung für Latex USTVA Formulare
-    if ($myconfig{numberformat} eq '1.000,00' or 
-         $myconfig{numberformat} eq '1000,00') {
+    if (   $myconfig{numberformat} eq '1.000,00'
+        or $myconfig{numberformat} eq '1000,00') {
       foreach $number (@numbers) {
         $form->{$number} =~ s/,/~~/g;
       }
       foreach $number (@numbers) {
         $form->{$number} =~ s/,/~~/g;
       }
-    }  
-    if ($myconfig{numberformat} eq '1000.00' or 
-         $myconfig{numberformat} eq '1,000.00') {
+    }
+    if (   $myconfig{numberformat} eq '1000.00'
+        or $myconfig{numberformat} eq '1,000.00') {
       foreach $number (@numbers) {
         $form->{$number} =~ s/\./~~/g;
       }
     }
       foreach $number (@numbers) {
         $form->{$number} =~ s/\./~~/g;
       }
     }
-  # Formatierungen für HTML Ausgabe
-  } elsif ($form->{format} eq 'html') {
+
+    # Formatierungen für HTML Ausgabe
+      } elsif ($form->{format} eq 'html') {
     $form->{padding} = "&nbsp;&nbsp;";
     $form->{bold}    = "<b>";
     $form->{endbold} = "</b>";
     $form->{padding} = "&nbsp;&nbsp;";
     $form->{bold}    = "<b>";
     $form->{endbold} = "</b>";
@@ -1019,9 +1030,12 @@ sub generate_ustva {
   }
 
   if ($form->{format} eq 'elster') {
   }
 
   if ($form->{format} eq 'elster') {
-    if ($form->{duetyp} eq '13'){
+    if ($form->{duetyp} eq '13') {
       $form->header;
       $form->header;
-      USTVA::info($locale->text('Impossible to create yearly Tax Report via Winston.<br \> Not yet implemented!'));
+      USTVA::info(
+        $locale->text(
+          'Impossible to create yearly Tax Report via Winston.<br \> Not yet implemented!'
+        ));
     } else {
       &create_winston();
     }
     } else {
       &create_winston();
     }
@@ -1031,14 +1045,18 @@ sub generate_ustva {
 
     $form->{IN} = "$form->{type}";
     $form->{IN} = "$form->{help}" if ($form->{type} eq 'help');
 
     $form->{IN} = "$form->{type}";
     $form->{IN} = "$form->{help}" if ($form->{type} eq 'help');
-    $form->{IN} = 'USTE' if ($form->{duetyp} eq '13' && 
-                             $form->{format} ne 'html');
-    
-    if ($form->{IN} eq 'USTE'){
+    $form->{IN} = 'USTE'
+      if (   $form->{duetyp} eq '13'
+          && $form->{format} ne 'html');
+
+    if ($form->{IN} eq 'USTE') {
       $form->header;
       $form->header;
-      USTVA::info($locale->text('Impossible to create yearly Tax Report as PDF or PS.<br \> Not yet implemented!'));
+      USTVA::info(
+        $locale->text(
+          'Impossible to create yearly Tax Report as PDF or PS.<br \> Not yet implemented!'
+        ));
     }
     }
-    
+
     $form->{IN} .= "-$form->{year}"
       if (   $form->{format} eq 'pdf'
           or $form->{format} eq 'postscript');
     $form->{IN} .= "-$form->{year}"
       if (   $form->{format} eq 'pdf'
           or $form->{format} eq 'postscript');
@@ -1058,6 +1076,7 @@ sub generate_ustva {
 
 sub edit {
   $lxdebug->enter_sub();
 
 sub edit {
   $lxdebug->enter_sub();
+
   # edit all taxauthority prefs
 
   $form->header;
   # edit all taxauthority prefs
 
   $form->header;
@@ -1080,16 +1099,14 @@ sub edit {
      <table width=100%>
        <tr>
          <th class="listtop">|
      <table width=100%>
        <tr>
          <th class="listtop">|
-    . $locale->text('Finanzamt - Einstellungen')
-    . qq|</th>
+    . $locale->text('Finanzamt - Einstellungen') . qq|</th>
        </tr>
         <tr>
          <td>
            <br>
            <fieldset>
            <legend><b>|
        </tr>
         <tr>
          <td>
            <br>
            <fieldset>
            <legend><b>|
-    . $locale->text('Angaben zum Finanzamt')
-    . qq|</b></legend>
+    . $locale->text('Angaben zum Finanzamt') . qq|</b></legend>
   |;
 
   #print qq|$form->{terminal}|;
   |;
 
   #print qq|$form->{terminal}|;
@@ -1139,8 +1156,7 @@ sub edit {
   print qq|
            <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1" $checked>
            <label for="">|
   print qq|
            <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1" $checked>
            <label for="">|
-    . $locale->text('Dauerfristverlängerung')
-    . qq|</label>
+    . $locale->text('Dauerfristverlängerung') . qq|</label>
            
            </fieldset>
            <br>
            
            </fieldset>
            <br>
@@ -1193,8 +1209,7 @@ sub edit {
            <br>
            <hr>
            <!--<input type=submit class=submit name=action value="|
            <br>
            <hr>
            <!--<input type=submit class=submit name=action value="|
-    . $locale->text('debug')
-    . qq|">-->
+    . $locale->text('debug') . qq|">-->
            |;
   print qq|
            <input type="button" name="Verweis" value="|
            |;
   print qq|
            <input type="button" name="Verweis" value="|
@@ -1263,22 +1278,19 @@ sub edit_form {
     if ($form->{saved} eq $locale->text('saved'));
 
   # Auf Übergabefehler checken
     if ($form->{saved} eq $locale->text('saved'));
 
   # Auf Übergabefehler checken
-  USTVA::info(
-    $locale->text('Missing Tax Authoritys Preferences') . "\n" . 
-    $locale->text('USTVA-Hint: Tax Authoritys'))
+  USTVA::info(  $locale->text('Missing Tax Authoritys Preferences') . "\n"
+              . $locale->text('USTVA-Hint: Tax Authoritys'))
     if (   $form->{elsterFFFF_new} eq 'Auswahl'
         || $form->{elsterland_new} eq 'Auswahl');
     if (   $form->{elsterFFFF_new} eq 'Auswahl'
         || $form->{elsterland_new} eq 'Auswahl');
-  USTVA::info(
-    $locale->text('Missing Method!') . "\n" . 
-    $locale->text('USTVA-Hint: Method'))
+  USTVA::info(  $locale->text('Missing Method!') . "\n"
+              . $locale->text('USTVA-Hint: Method'))
     if ($form->{method} eq '');
 
   # Klären, ob Variablen bereits befüllt sind UND ob veräderungen auf
   # der vorherigen Maske stattfanden: $change = 1(in der edit sub,
   # mittels get_config)
 
     if ($form->{method} eq '');
 
   # Klären, ob Variablen bereits befüllt sind UND ob veräderungen auf
   # der vorherigen Maske stattfanden: $change = 1(in der edit sub,
   # mittels get_config)
 
-  my $change =
-       $form->{elsterland} eq $form->{elsterland_new}
+  my $change = $form->{elsterland} eq $form->{elsterland_new}
     && $form->{elsterFFFF} eq $form->{elsterFFFF_new} ? '0' : '1';
   $change = '0' if ($form->{saved} eq $locale->text('saved'));
   my $elster_init = &elster_hash();
     && $form->{elsterFFFF} eq $form->{elsterFFFF_new} ? '0' : '1';
   $change = '0' if ($form->{saved} eq $locale->text('saved'));
   my $elster_init = &elster_hash();
@@ -1339,8 +1351,7 @@ sub edit_form {
    <table width="100%">
        <tr>
         <th colspan="2" class="listtop">|
    <table width="100%">
        <tr>
         <th colspan="2" class="listtop">|
-    . $locale->text('Finanzamt - Einstellungen')
-    . qq|</th>
+    . $locale->text('Finanzamt - Einstellungen') . qq|</th>
        </tr>
        <tr>
          <td colspan=2>
        </tr>
        <tr>
          <td colspan=2>
@@ -1579,8 +1590,7 @@ sub show_fa_daten {
                <fieldset>
                <legend>
                <font size="+1">|
                <fieldset>
                <legend>
                <font size="+1">|
-    . $locale->text('Finanzamt')
-    . qq| $form->{FA_Name}</font>
+    . $locale->text('Finanzamt') . qq| $form->{FA_Name}</font>
                </legend>
   |;
 
                </legend>
   |;
 
@@ -1942,6 +1952,7 @@ Content-Disposition: attachment; filename="$elsterfile"\n\n|;
 
 sub continue {
   $lxdebug->enter_sub();
 
 sub continue {
   $lxdebug->enter_sub();
+
   # allow Symbolic references just here:
   no strict 'refs';
   &{ $form->{nextsub} };
   # allow Symbolic references just here:
   no strict 'refs';
   &{ $form->{nextsub} };
@@ -1949,9 +1960,9 @@ sub continue {
   $lxdebug->leave_sub();
 }
 
   $lxdebug->leave_sub();
 }
 
-sub back { 
+sub back {
   $lxdebug->enter_sub();
   $lxdebug->enter_sub();
-  &{ $form->{lastsub} }; 
+  &{ $form->{lastsub} };
   $lxdebug->leave_sub();
 }
 
   $lxdebug->leave_sub();
 }