From 88abbfe0739ad7c53c2553b63087f3013ed80017 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Fri, 26 Jan 2007 19:37:04 +0000 Subject: [PATCH] Formatierungscleanup, Taxbird Nummernformat auf '1000,00' geaendert. --- SL/USTVA.pm | 16 ++++++++-------- bin/mozilla/ustva.pl | 27 +++++++++++++++++---------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 97a8a6fde..4287c3135 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -605,16 +605,16 @@ sub ustva { $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->{"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"}; # Hier fehlen moeglicherweise noch einige Berechnungen! $dbh->disconnect; diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index daecb8d88..3b799e6e0 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -738,12 +738,16 @@ sub generate_ustva { # Outputformat specific customisation's # - my @category_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 @category_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 @category_euro = qw(41 44 49 43 48 51 86 35 77 76 91 97 93 - 95 94 42 60 45 52 73 84); + my @category_euro = qw( + 41 44 49 43 48 51 86 35 77 76 91 + 97 93 95 94 42 60 45 52 73 84 + ); if ( $form->{format} eq 'pdf' or $form->{format} eq 'postscript') { @@ -829,6 +833,7 @@ sub generate_ustva { elsif ( $form->{format} eq 'elstertaxbird' ) { + # Define serveral filenames $form->{IN} = 'taxbird.txb'; $form->{attachment_filename} = "USTVA-" . $form->{period} @@ -836,6 +841,11 @@ sub generate_ustva { $form->{tmpfile} = "$userspath/" . $form->{attachment_filename}; + # TODO: set Output to UTF-8 or system Preference + #$form->{"iconv"} = Text::Iconv->new($myconfig{dbcharset}, "UTF-8"); + #my $iconv = $self->{"iconv"}; + #$iconv->convert($variable); + if ($form->{period} =~ /^[4]\d$/ ){ my %periods = ( # Lx => taxbird '41' => '12', @@ -871,8 +881,6 @@ sub generate_ustva { $form->{taxbird_land_nr} = $lands{$land} if ($form->{elsterland} eq $land ); } - - $form->{co_zip} = $form->{co_city}; $form->{co_zip} =~ s/\D//g; $form->{co_city} =~ s/\d//g; @@ -887,11 +895,10 @@ sub generate_ustva { $form->{taxbird_steuernummer} =~ s/\///; # ersten Querstrich ersetzen # Numberformatting for Taxbird - my $temp_numberformat = $myconfig{numberformat}; - # Numberformat must be '1000.00' for Taxbird ?! - $myconfig{numberformat} = '1000.00'; + # Numberformat must be '1000,00' for Taxbird ?! + $myconfig{numberformat} = '1000,00'; foreach my $number (@category_cent) { $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : ''; -- 2.20.1