From: Moritz Bunkus Date: Tue, 3 Nov 2020 16:53:54 +0000 (+0100) Subject: MT940-Import: AQBanking-Unterstützung entfernt X-Git-Tag: kivitendo-mebil_0.1-0~9^2~666 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e4783220694ca149a88826c10fc698d2dad6bbd1;p=kivitendo-erp.git MT940-Import: AQBanking-Unterstützung entfernt --- diff --git a/SL/Helper/MT940.pm b/SL/Helper/MT940.pm deleted file mode 100644 index c25fd5962..000000000 --- a/SL/Helper/MT940.pm +++ /dev/null @@ -1,46 +0,0 @@ -package SL::Helper::MT940; - -use strict; -use File::Path qw(mkpath); -use File::Copy qw(copy); - -sub convert_mt940_data { - my ($mt940_data) = @_; - - # takes the data from an uploaded mt940 file, converts it to csv via aqbanking and returns the converted data - # The uploaded file data is stored as a session file, just like the aqbanking settings file. - - my $import_filename = 'bank_transfer.940'; - my $sfile = SL::SessionFile->new($import_filename, mode => '>'); - $sfile->fh->print($mt940_data); - $sfile->fh->close; - - # create needed dir structure for aqbanking 5.x and 6.x - my $todir = $sfile->get_path . '/imexporters/csv/profiles'; - mkpath $todir; - die "Cannot create $todir" unless -d $todir; - - File::Copy::copy('users/aqbanking.conf', $todir.'/kivi.conf'); - die "Cannot create local aqbanking conf " unless -f $todir.'/kivi.conf'; - - mkpath $sfile->get_path . '/settings6/aqbanking'; - - my $aqbin = $::lx_office_conf{applications}->{aqbanking}; - die "Can't find aqbanking-cli, please check your configuration file.\n" unless -f $aqbin; - my $cmd = "$aqbin --cfgdir=\"" . $sfile->get_path . "\" import --importer=\"swift\" --profile=\"SWIFT-MT940\" -f " . - $sfile->get_path . "/$import_filename | $aqbin --cfgdir=\"" . $sfile->get_path . "\" export --profile=kivi 2> /dev/null "; - - my $converted_data = '"empty";"local_bank_code";"local_account_number";"remote_bank_code";"remote_account_number";"transdate";"valutadate";"amount";'. - '"currency";"remote_name";"remote_name_1";"purpose";"purpose1";"purpose2";"purpose3";"purpose4";"purpose5";"purpose6";"purpose7";"purpose8";"purpose9";'. - '"purpose10";"purpose11";"transaction_key";"customer_reference";"bank_reference";"transaction_code";"transaction_text"'."\n"; - - open my $mt, "-|", "$cmd" || die "Problem with executing aqbanking\n"; - my $headerline = <$mt>; # discard original aqbanking header line - while (<$mt>) { - $converted_data .= $_; - }; - close $mt; - return $converted_data; -}; - -1; diff --git a/config/kivitendo.conf.default b/config/kivitendo.conf.default index cf2998495..82683188b 100644 --- a/config/kivitendo.conf.default +++ b/config/kivitendo.conf.default @@ -172,10 +172,6 @@ latex = pdflatex # binary. python_uno = python -# Location of the aqbanking binary to use when converting MT940 files -# into the kivitendo import format -aqbanking = /usr/bin/aqbanking-cli - [environment] # Add the following paths to the PATH environment variable. path = /usr/local/bin:/usr/X11R6/bin:/usr/X11/bin diff --git a/doc/dokumentation.xml b/doc/dokumentation.xml index 46a04617a..7f98d4041 100644 --- a/doc/dokumentation.xml +++ b/doc/dokumentation.xml @@ -430,7 +430,7 @@ libimage-info-perl libgd-gd2-perl libapache2-mod-fcgid \ libfile-copy-recursive-perl postgresql libalgorithm-checkdigits-perl \ libcrypt-pbkdf2-perl git libcgi-pm-perl libtext-unidecode-perl libwww-perl\ - postgresql-contrib aqbanking-tools poppler-utils libhtml-restrict-perl\ + postgresql-contrib poppler-utils libhtml-restrict-perl\ libdatetime-set-perl libset-infinite-perl liblist-utilsby-perl\ libdaemon-generic-perl libfile-flock-perl libfile-slurp-perl\ libfile-mimeinfo-perl libpbkdf2-tiny-perl libregexp-ipv6-perl \ @@ -557,9 +557,6 @@ Andere Pakete installieren - - aqbanking-tools Für das Parsen des MT940 Bankformats (Version 6 oder höher) - poppler-utils 'pdfinfo' zum Erkennen der Seitenanzahl bei der PDF-Generierung @@ -567,9 +564,9 @@ Postgres Trigram-Index Für datenbankoptimierte Suchanfragen. Bspw. im Paket postgresql-contrib enthalten - Debian und Ubuntu: apt install aqbanking-tools postgresql-contrib poppler-utils - Fedora: dnf install aqbanking poppler-utils postgresql-contrib - openSUSE: zypper install aqbanking-tools poppler-tools + Debian und Ubuntu: apt install postgresql-contrib poppler-utils + Fedora: dnf install poppler-utils postgresql-contrib + openSUSE: zypper install poppler-tools diff --git a/scripts/installation_check.pl b/scripts/installation_check.pl index db4ae24c7..33fd7ca73 100755 --- a/scripts/installation_check.pl +++ b/scripts/installation_check.pl @@ -95,7 +95,6 @@ if ($check{r}) { if ($check{o}) { print_header('Checking Optional Modules'); check_module($_, optional => 1) for @SL::InstallationCheck::optional_modules; - check_aqbanking(); } if ($check{d}) { print_header('Checking Developer Modules'); @@ -242,31 +241,6 @@ sub check_pdfinfo { } } -sub check_aqbanking { - my $aqbin = $::lx_office_conf{applications}->{aqbanking}; - if ( !$aqbin ) { - print_line('Looking for aqbanking executable', 'not configured','red'); - } - else { - my $line = "Looking for aqbanking executable '".$aqbin."'"; - my $shell_out = `$aqbin versions 2>&1 | grep AqBanking-CLI 2> /dev/null`; - my ($label,$version) = split /:/,$shell_out; - if ( $label && $label eq ' AqBanking-CLI' ) { - chop $version; - my ($number_version) = $version =~ /(\d+)/; - if ($number_version < 6) { - print_line($line, "Requires at least version 6, current version is " . $version, 'red'); - } else { - print_line($line, $version, 'green'); - } - } else { - print_line($line, 'not installed','red'); - my %modinfo = ( name => 'aqbanking' ); - push @missing_modules, \%modinfo; - } - } -} - sub check_module { my ($module, %role) = @_;