X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUSTVA.pm;h=bf9ebbdb9ec2b742534ceb0b44f5dea4efe36616;hb=627503c1d8443acdb4c50362c3981e68564a12d4;hp=abbf4a32c527fe3b54f707ef5ed0f4704d5a65cd;hpb=74fca575d438232002756175338c23f55b8a6c12;p=kivitendo-erp.git diff --git a/SL/USTVA.pm b/SL/USTVA.pm index abbf4a32c..bf9ebbdb9 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -1,5 +1,5 @@ #===================================================================== -# Lx-Office ERP +# kivitendo ERP # Copyright (c) 2004 by Udo Spallek, Aachen # # Author: Udo Spallek @@ -518,9 +518,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 +527,7 @@ sub query_finanzamt { #execute second last call my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr); $dbh->disconnect(); - } + }; $tst->finish(); #$dbh->disconnect(); @@ -808,7 +806,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>=59 AND tk.pos_ustva<=66) or (tk.pos_ustva>=89 AND tk.pos_ustva<=93))"; if ($fromdate) { if ($form->{method} eq 'cash') {