X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=sql%2FPg-upgrade2%2FUSTVA_abstraction.pl;h=24dbd42edd7c04e7de1bf8a01af88c0296550b71;hb=cde799cae99cdae17badecdf3edc582084b37400;hp=9c217188415e685f2ca877a8706c1f0cd176cdcd;hpb=d65bfa97a852b44c2a713ae2f7dc266269814488;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2/USTVA_abstraction.pl b/sql/Pg-upgrade2/USTVA_abstraction.pl index 9c2171884..24dbd42ed 100644 --- a/sql/Pg-upgrade2/USTVA_abstraction.pl +++ b/sql/Pg-upgrade2/USTVA_abstraction.pl @@ -1,5 +1,5 @@ # @tag: USTVA_abstraction -# @description: Abstraktion der USTVA Report Daten. Dies vereinfacht die Integration von Steuerberichten anderer Nationen in Lx-Office. +# @description: Abstraktion der USTVA Report Daten. Dies vereinfacht die Integration von Steuerberichten anderer Nationen in kivitendo. # @depends: release_2_4_2 # Abstraktionlayer between general Taxreports and USTVA @@ -8,6 +8,8 @@ ################### +use strict; + die("This script cannot be run from the command line.") unless ($main::form); sub mydberror { @@ -147,7 +149,7 @@ sub do_copy { my $query = $iconv->convert($copy_statements[$statement]); my $sth = $dbh->prepare($query) || mydberror($query); - for my $copy_line ( 1 .. $#{$copy_data[$statement]} ) { + for my $copy_line ( 0 .. $#{$copy_data[$statement]} ) { #print $copy_data[$statement][$copy_line] . "
" $sth->execute(split m/;/, $iconv->convert($copy_data[$statement][$copy_line]), -1) || mydberror($query); }