X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b61db412d0d913a4fcecbce6678710ad0eb76cf6..39f3d12c0cc462f8b110966095cbc2ffef8ad8f6:/bin/mozilla/datev.pl
diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl
index 62a1cf006..f1110e403 100644
--- a/bin/mozilla/datev.pl
+++ b/bin/mozilla/datev.pl
@@ -25,6 +25,10 @@
#
#======================================================================
+use POSIX qw(strftime getcwd);
+use Archive::Zip qw(:ERROR_CODES :CONSTANTS);
+
+use SL::Common;
use SL::DATEV;
1;
@@ -80,13 +84,14 @@ sub export {
|
- | |
- . $locale->text("Kontonummernerweiterung (KNE)") . qq| |
+ | . # OBE-Export noch nicht implementiert! | . $locale->text("Kontonummernerweiterung (KNE)") . qq| |
+ qq| |
|
| . $locale->text("Abrechnungsnummer") . qq| |
|
+
| |
. $locale->text("Export Buchungsdaten") . qq| |
@@ -321,14 +326,65 @@ sub export3 {
DATEV->save_datev_stamm(\%myconfig, \%$form);
+ my $link = $form->{"script"} . "?";
+ map({ $link .= "${_}=" . $form->escape($form->{$_}) . "&"; } qw(path login password));
+ $link .= "action=download";
+
if ($form->{kne}) {
- if (DATEV->kne_export(\%myconfig, \%$form)) {
- $form->redirect($locale->text('KNE Export erfolgreich!'));
+ my @filenames = DATEV->kne_export(\%myconfig, \%$form);
+ if (@filenames) {
+ print(qq|
| . $locale->text('KNE-Export erfolgreich!') . qq|
|);
+ $link .= "&filenames=" . $form->escape(join(":", @filenames));
+ print(qq|
Download|);
+ } else {
+ $form->error("KNE-Export schlug fehl.");
}
} else {
- if (DATEV->obe_export(\%myconfig, \%$form)) {
- $form->redirect($locale->text('OBE Export erfolgreich!'));
+ my @filenames = DATEV->obe_export(\%myconfig, \%$form);
+ if (@filenames) {
+ print(qq|
| . $locale->text('OBE-Export erfolgreich!') . qq|
|);
+ $link .= "&filenames=" . $form->escape(join(":", @filenames));
+ print(qq|
Download|);
+ } else {
+ $form->error("OBE-Export schlug fehl.");
}
}
+
+ print("