X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FUSTVA.pm;h=72bf0b16e42c9cc6be1d0ee550b561781544f51d;hb=13b7b660f564981597f58ba4e6d0b4cc5b7c6d1a;hp=a5db373ad83a201b5db73db31d4e393b4fe5d63d;hpb=c497b0352f95a55d204101b70ac771b2dc21ddee;p=kivitendo-erp.git diff --git a/SL/USTVA.pm b/SL/USTVA.pm index a5db373ad..72bf0b16e 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -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();