X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdatev.pl;h=9944abfba13e699fe72a2e19c69aaf32c5402082;hb=71196b75e9beb984ead25c605ab91443269de88d;hp=62a1cf006bdefc084c43414ec606429ad1c7f6db;hpb=081a4f9736f3bc345872be8f61632cbed4a8d9b3;p=kivitendo-erp.git
diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl
index 62a1cf006..9944abfba 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| |
@@ -173,6 +178,7 @@ sub export_bewegungsdaten {
. $locale->text('III') . qq|
|;
+ $form->{"jsscript"} = 1;
$form->header;
print qq|
@@ -209,9 +215,11 @@ sub export_bewegungsdaten {
| |
. $locale->text('Datum von') . qq| |
- |
+
+ |
| . $locale->text('bis') . qq| |
- |
+
+ |
@@ -221,6 +229,10 @@ sub export_bewegungsdaten {
+| . $form->write_trigger(\%myconfig, 2,
+ "transdatefrom", "BL", "trigger_transdatefrom",
+ "transdateto", "BL", "trigger_transdateto") . qq|
+
@@ -321,14 +333,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("