X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdatev.pl;h=5f8c61e4353d6a2697fd54d340d19726cf2c2f91;hb=bfa7bf60b133969eb754d4506485c7132711f43f;hp=6d89a21b911823c3ee1b751ee9833f060297cfb8;hpb=8c7e44938a661e035f62840e1e177353240ace5d;p=kivitendo-erp.git
diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl
index 6d89a21b9..5f8c61e43 100644
--- a/bin/mozilla/datev.pl
+++ b/bin/mozilla/datev.pl
@@ -331,28 +331,33 @@ sub export3 {
$auth->assert('datev_export');
+ DATEV::clean_temporary_directories();
+
DATEV->save_datev_stamm(\%myconfig, \%$form);
- my $link = "datev.pl?action=download";
+ my $link = "datev.pl?action=download&download_token=";
if ($form->{kne}) {
- 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|);
+ my $result = DATEV->kne_export(\%myconfig, \%$form);
+ if ($result && @{ $result->{filenames} }) {
+ $link .= Q($result->{download_token});
+
+ print(qq|
| . $locale->text('KNE-Export erfolgreich!') . qq|
Download|);
+
} else {
$form->error("KNE-Export schlug fehl.");
}
} else {
- 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.");
- }
+ # OBE-Export nicht implementiert.
+
+ # 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("