X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a6e40ee893e46a3b9ece81e5ba5eb5de0e0f7ed2..ccd0b365250f57021a756203f65a4d153709b45d:/SL/USTVA.pm diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 365520874..658e2c766 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);