X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUSTVA.pm;h=d387b5ec448500232aee7d6312a9f01f3043ca85;hb=ed76c91e9b0870269fd66b3b6d13dbeb68c9c153;hp=a5db373ad83a201b5db73db31d4e393b4fe5d63d;hpb=c497b0352f95a55d204101b70ac771b2dc21ddee;p=kivitendo-erp.git diff --git a/SL/USTVA.pm b/SL/USTVA.pm index a5db373ad..d387b5ec4 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -102,8 +102,6 @@ sub report_variables { # Get all positions for taxreport out of the database # Needs Databaseupdate Pg-upgrade2/USTVA_abstraction.pl - return unless defined wantarray; - my ( $self, $arg_ref) = @_; @@ -518,9 +516,7 @@ sub query_finanzamt { my $filename = "sql/$table.sql"; my $tst = $dbh->prepare("SELECT * FROM $table"); - $tst->execute; - if ($DBI::err) { - + $tst->execute || do { #There is no table, read the table from sql/finanzamt.sql print qq|

Bitte warten, Tabelle $table wird einmalig in Datenbank: $myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...

|; @@ -529,7 +525,7 @@ sub query_finanzamt { #execute second last call my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr); $dbh->disconnect(); - } + }; $tst->finish(); #$dbh->disconnect(); @@ -761,10 +757,10 @@ sub ustva { $form->{"Z45"} = $form->{"Z43"}; - $form->{"Z53"} = $form->{"Z45"} + $form->{"53"} + $form->{"74"} + $form->{"Z53"} = $form->{"Z45"} + $form->{"47"} + $form->{"53"} + $form->{"74"} + $form->{"85"} + $form->{"65"}; - $form->{"Z62"} = $form->{"Z43"} - $form->{"66"} - $form->{"61"} + $form->{"Z62"} = $form->{"Z53"} - $form->{"66"} - $form->{"61"} - $form->{"62"} - $form->{"67"} - $form->{"63"} - $form->{"64"} - $form->{"59"}; @@ -808,7 +804,7 @@ sub get_accounts_ustva { my $arwhere = ""; my $item; - my $gltaxkey_where = "(tk.pos_ustva>=59 AND tk.pos_ustva<=66)"; + my $gltaxkey_where = "((tk.pos_ustva = 46) OR (tk.pos_ustva>=59 AND tk.pos_ustva<=67) or (tk.pos_ustva>=89 AND tk.pos_ustva<=93))"; if ($fromdate) { if ($form->{method} eq 'cash') {