X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUSTVA.pm;h=13f9a62869dd108d20c714c8dafad1289f2c75df;hb=996ddb70dc0d35be7a72e981ab38011a13d09484;hp=81b7f526eb03b1ac53b0db32615a58f7fa7cfae8;hpb=7679dfa4ba64c4cc24a027fa5bdfd5e616ca92a8;p=kivitendo-erp.git diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 81b7f526e..13f9a6286 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -25,6 +25,31 @@ package USTVA; +use SL::DBUtils; + +sub get_coa { + + my ( $self, $form, $myconfig) = @_; + + my $query = q{ SELECT coa FROM defaults }; + + my $dbh = $form->dbconnect($myconfig); + my $sth = $dbh->prepare($query); + $sth->execute() || $form->dberror($query); + + my ($coa) = selectrow_query($form, $dbh, $query); + + $sth->finish; + $dbh->disconnect; + + $form->{coa} = $coa; + $form->{"COA_$coa"} = '1'; + $form->{COA_Germany} = '1' if ( $coa eq 'Germany-DATEV-SKR03EU' or $coa eq 'Germany-DATEV-SKR04EU'); + + return; +} + + sub report_variables { # Get all positions for taxreport out of the database # Needs Databaseupdate Pg-upgrade2/USTVA_abstraction.pl @@ -53,8 +78,6 @@ sub report_variables { $where_dcp |; - $main::lxdebug->message(LXDebug::QUERY, "\$query= \n $query\n"); - my $dbh = $form->dbconnect($myconfig); my $sth = $dbh->prepare($query); @@ -134,7 +157,7 @@ sub steuernummer_input { 'Thüringen' => 'FFF/BBB/UUUUP', # '/' 3 'Sachsen' => 'FFF/BBB/UUUUP', # '/' 3 'Hamburg' => 'FF/BBB/UUUUP', # '/' 3 - 'Baden Würtemberg' => 'FF/BBB/UUUUP', # '/' 2 + 'Baden Württemberg' => 'FF/BBB/UUUUP', # '/' 2 'Sachsen Anhalt' => 'FFF/BBB/UUUUP', # '/' 3 'Saarland' => 'FFF/BBB/UUUUP', # '/' 3 'Bremen' => 'FF BBB UUUUP', # ' ' 3 @@ -287,7 +310,7 @@ sub fa_auswahl {