From: Jan Büren Date: Mon, 13 Jan 2014 16:39:03 +0000 (+0100) Subject: 2. Teil zu: Winston-Export, Taxbird-Export und Latex-Export für UstVA entfernt X-Git-Tag: release-3.1.0beta1~22^2~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=127b0df30d75e3833072276961e36bcd26bc0663;p=kivitendo-erp.git 2. Teil zu: Winston-Export, Taxbird-Export und Latex-Export für UstVA entfernt --- diff --git a/SL/Template/XML.pm b/SL/Template/XML.pm index 2e5078587..d9bd766f9 100644 --- a/SL/Template/XML.pm +++ b/SL/Template/XML.pm @@ -30,13 +30,8 @@ sub format_string { sub get_mime_type() { my ($self) = @_; - if ($self->{"form"}->{"format"} =~ /elsterwinston/i) { - return "application/xml "; - } elsif ($self->{"form"}->{"format"} =~ /elstertaxbird/i) { - return "application/x-taxbird"; - } else { - return "text"; - } + return "text"; + } sub uses_temp_file { diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 3c12f42a7..8c1b8a8f6 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -21,6 +21,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # German Tax authority Module and later ELSTER Interface +# 08.01.14 ELSTER Interface software (taxbird/winston) removed #====================================================================== use strict; @@ -502,28 +503,9 @@ sub show_options { my $media = qq| |; my $format = qq| |; - if ($::lx_office_conf{print_templates}{latex}) { - $format .= - qq| |; - } - - #my $disabled= qq|disabled="disabled"|; - #$disabled='' if ($form->{elster} eq '1' ); - if ($::form->{elster} eq '1') { - $format .= - qq|| - . qq||; - } - #$format .= qq||; my $show_options = qq| $type $media @@ -833,177 +815,6 @@ sub generate_ustva { foreach my $number (@category_euro) { $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '0'); } - - } elsif ( $form->{format} eq 'elsterwinston' ) { - - $form->{IN} = 'winston.xml'; - - # - # Build Winston filename - # - - my $file = 'U'; # 1. char 'U' = USTVA - $file .= $form->{period}; - #4. and 5. char = year modulo 100 - $file .= sprintf("%02d", $form->{year} % 100); - #6. to 18. char = Elstersteuernummer - #Beispiel: Steuernummer in Bayern - #111/222/33334 ergibt für UStVA Jan 2004: U01049111022233334 - $file .= $form->{elsterFFFF}; - $file .= $form->{elstersteuernummer}; - #file suffix - $file .= '.xml'; - $file =~ s|.*/||; - - $form->{attachment_filename} = $file; - - # Zahlenformatierung für Winston - - my $temp_numberformat = $myconfig{numberformat}; - - # Numberformat must be '1000,00' for Winston - - $myconfig{numberformat} = '1000,00'; - - foreach my $number (@category_cent) { - $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : ''; - } - - foreach my $number (@category_euro) { - $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : ''; - } - # Re-set Numberformat - $myconfig{numberformat} = $temp_numberformat; - - # push Kennziffern to <%foreach Array fo easyer - # output in xml format. Thx to Moritz. - my %winston_id_for = ( - # No Winston remap?! - ); - - foreach my $kennziffer (@category_cent, @category_euro) { - - next if ( $kennziffer =~ m/Z\d\d/); - next if ( $form->{$kennziffer} == 0 ); - - if (defined $winston_id_for{$kennziffer} ) { - push(@{ $form->{id}}, $winston_id_for{$kennziffer}); - } else { - push(@{ $form->{id}}, "Kz$kennziffer"); - } - push(@{ $form->{amount}}, $form->{$kennziffer}); - } - - } elsif ( $form->{format} eq 'elstertaxbird' ) { - - # Define serveral filenames - $form->{IN} = 'taxbird.txb'; - - $form->{attachment_filename} = "USTVA-" . ($form->{period} * 1) . sprintf("%02d", $form->{year} % 100) . ".txb"; - - $form->{attachment_filename} =~ s|.*/||; - - if ($form->{period} =~ /^[4]\d$/ ){ - my %periods = ( # Lx => taxbird - '41' => '12', - '42' => '13', - '43' => '14', - '44' => '15', - ); - - foreach my $quarter ( keys %periods ) { - $form->{taxbird_period} = $periods{$quarter} if ( $form->{period} eq $quarter); - } - } elsif ($form->{period} =~ /^\d+$/ ) { - $form->{period} =~ s/^0//g; - my $period = $form->{period}; - $period *= 1; - $period--; - $form->{taxbird_period} = $period; - } else { - $form->header; - USTVA::error( $locale->text('Wrong Period' )); - ::end_of_request(); - } - - # heuristics for address splitting - # lx-office holds the entire address in a single field. - # taxbird expects it to be splitted into street, zipcode and city - if ($form->{co_street} =~ /\n/) { - my $new_co_street; - for (split /\n/, $form->{co_street}) { - if (/(\d{3,5})\s+(\w+)/) { - $form->{co_zip} = $1; - $form->{co_city} = $2; - } else { - $new_co_street .= $_; - } - } - $form->{co_street} = $new_co_street; - } else { - $form->{co_zip} = $form->{co_city}; - $form->{co_zip} =~ s/\D//g; - $form->{co_city} =~ s/\d//g; - $form->{co_city} =~ s/^\s//g; - } - - my $tax_office = first { $_->{name} eq $form->{elsterland} } @{ $ustva->{tax_office_information} }; - $form->{taxbird_land_nr} = $tax_office->{taxbird_nr} if $tax_office; - - ($form->{co_phone_prefix}, $form->{co_phone}) = split("-", $form->{tel}); - $form->{co_phone_prefix} =~ s/\s//g; - $form->{co_phone} =~ s/\s//g; - - $form->{taxbird_steuernummer} = $form->{steuernummer}; - # $form->{taxbird_steuernummer} =~ s/\D//g; -# $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'; - foreach my $number (@category_cent) { - $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : ''; - } - - foreach my $number (@category_euro) { - $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : ''; - } - # Re-set Numberformat - $myconfig{numberformat} = $temp_numberformat; - - # push Kennziffern to <%foreach Array fo easyer - # output in xml format. Thx to Moritz. - my %taxbird_id_for = ( - - '511' => 'Kz51-calc', - '861' => 'Kz86-calc', - '971' => 'Kz97-calc', - '931' => 'Kz93-calc', - '811' => 'Kz81-calc', - '891' => 'Kz89-calc', - 'Z45' => 'uebertrag', - 'Z53' => 'ust-sum', - 'Z62' => 'ust-minus-vost', - 'Z65' => 'ust-sum+69', - 'Z67' => 'ust-vz', - ); - - - for my $kennziffer (@category_cent, @category_euro) { - - next if ($kennziffer eq 'Z43'); - - if ($form->{$kennziffer} != 0){ - if (defined $taxbird_id_for{$kennziffer}) { - push(@{ $form->{id}}, $taxbird_id_for{$kennziffer}); - } else { - push(@{ $form->{id}}, "Kz$kennziffer"); - } - push(@{ $form->{amount}}, $form->{$kennziffer}); - } - } - } elsif ( $form->{format} eq '' ){ # No format error. $form->header; USTVA::error( $locale->text('Application Error. No Format given' ) . "!"); diff --git a/doc/changelog b/doc/changelog index 126877b7a..2d714e78d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -39,6 +39,11 @@ Größere neue Features: Kleinere neue Features und Detailverbesserungen: +- Die bwa.html und ustva.html werden jetzt zentral gepflegt und nicht mehr als benutzerdefinierte + Druckvorlage. Falls hier jmd. Anpassungen gemacht hat, müssten diese in templates/rp/$VORLAGE.html + nachgepflegt werden +- Für UstVa: Winston, Taxbird und Pdf-Export werden nicht mehr unterstützt. Die UstVa muss sowieso mittlerweile + per Elster erfolgen - Lieferbedingungen analog zu Zahlungsbedingungen eingeführt. Sie können angelegt, beim Benutzer voreingestellt und in allen Ein- und Ver- kaufsmasken gesetzt werden. diff --git a/templates/print/RB/taxbird.txb b/templates/print/RB/taxbird.txb deleted file mode 100644 index c1a8a39cc..000000000 --- a/templates/print/RB/taxbird.txb +++ /dev/null @@ -1,23 +0,0 @@ -;; This file was produced by lx-office -;; for using in taxbird. -;; You probably don't want to touch this -;; file. In case you do want it anyway, -;; be warned: BE CAREFUL!! -;; -'("Umsatzsteuervoranmeldung <%year%>" ( -("vend-id" . "74931") -("land-lieferant" . "<%elsterland%>") -("name-lieferant" . "<%company%>") -("berufsbez" . "") -("strasse-lieferant" . "<%co_street%>") -("plz-lieferant" . "<%co_zip%> ") -("ort-lieferant" . "<%co_city%>") -("vorwahl" . "<%co_phone_prefix%>") -("anschluss" . "<%co_phone%>") -("land" . "<%taxbird_land_nr%>") -("zeitraum" . "<%taxbird_period%>") -("stnr" . "<%taxbird_steuernummer%>") - -<%foreach id%> -("<%id%>" . "<%amount%>")<%end%> -)) \ No newline at end of file diff --git a/templates/print/RB/winston.xml b/templates/print/RB/winston.xml deleted file mode 100644 index ad3effa2a..000000000 --- a/templates/print/RB/winston.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - <%elsterFFFF%><%elstersteuernummer%> - <%year%> - <%period%> - -<%foreach id%> - <%amount%> -<%end%> - - - diff --git a/templates/print/Standard/taxbird.txb b/templates/print/Standard/taxbird.txb deleted file mode 100644 index c1a8a39cc..000000000 --- a/templates/print/Standard/taxbird.txb +++ /dev/null @@ -1,23 +0,0 @@ -;; This file was produced by lx-office -;; for using in taxbird. -;; You probably don't want to touch this -;; file. In case you do want it anyway, -;; be warned: BE CAREFUL!! -;; -'("Umsatzsteuervoranmeldung <%year%>" ( -("vend-id" . "74931") -("land-lieferant" . "<%elsterland%>") -("name-lieferant" . "<%company%>") -("berufsbez" . "") -("strasse-lieferant" . "<%co_street%>") -("plz-lieferant" . "<%co_zip%> ") -("ort-lieferant" . "<%co_city%>") -("vorwahl" . "<%co_phone_prefix%>") -("anschluss" . "<%co_phone%>") -("land" . "<%taxbird_land_nr%>") -("zeitraum" . "<%taxbird_period%>") -("stnr" . "<%taxbird_steuernummer%>") - -<%foreach id%> -("<%id%>" . "<%amount%>")<%end%> -)) \ No newline at end of file diff --git a/templates/print/Standard/winston.xml b/templates/print/Standard/winston.xml deleted file mode 100644 index ad3effa2a..000000000 --- a/templates/print/Standard/winston.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - <%elsterFFFF%><%elstersteuernummer%> - <%year%> - <%period%> - -<%foreach id%> - <%amount%> -<%end%> - - - diff --git a/templates/print/f-tex/taxbird.txb b/templates/print/f-tex/taxbird.txb deleted file mode 100644 index c1a8a39cc..000000000 --- a/templates/print/f-tex/taxbird.txb +++ /dev/null @@ -1,23 +0,0 @@ -;; This file was produced by lx-office -;; for using in taxbird. -;; You probably don't want to touch this -;; file. In case you do want it anyway, -;; be warned: BE CAREFUL!! -;; -'("Umsatzsteuervoranmeldung <%year%>" ( -("vend-id" . "74931") -("land-lieferant" . "<%elsterland%>") -("name-lieferant" . "<%company%>") -("berufsbez" . "") -("strasse-lieferant" . "<%co_street%>") -("plz-lieferant" . "<%co_zip%> ") -("ort-lieferant" . "<%co_city%>") -("vorwahl" . "<%co_phone_prefix%>") -("anschluss" . "<%co_phone%>") -("land" . "<%taxbird_land_nr%>") -("zeitraum" . "<%taxbird_period%>") -("stnr" . "<%taxbird_steuernummer%>") - -<%foreach id%> -("<%id%>" . "<%amount%>")<%end%> -)) \ No newline at end of file diff --git a/templates/print/f-tex/winston.xml b/templates/print/f-tex/winston.xml deleted file mode 100644 index ad3effa2a..000000000 --- a/templates/print/f-tex/winston.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - <%elsterFFFF%><%elstersteuernummer%> - <%year%> - <%period%> - -<%foreach id%> - <%amount%> -<%end%> - - -