X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fdatev.pl;h=9944abfba13e699fe72a2e19c69aaf32c5402082;hb=ebef09a8bde1d401fc7b0d60cfe09393e9a84c0f;hp=01c519d7b9495197d8d26fc40bebf6458cc15949;hpb=0576299f2aa98125991c4ffcd2f75073ea583d7d;p=kivitendo-erp.git
diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl
index 01c519d7b..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,23 +84,21 @@ 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| |
+ . $locale->text("Export Buchungsdaten") . qq|
|
|
- . $locale->text("Export Stammdaten")
- . qq| |
+ . $locale->text("Export Stammdaten") . qq|
|
@@ -145,38 +147,27 @@ sub export_bewegungsdaten {
. $locale->text('January')
. qq|
+ . $locale->text('February') . qq|
+ . $locale->text('March') . qq|
+ . $locale->text('April') . qq|
+ . $locale->text('May') . qq|
+ . $locale->text('June') . qq|
+ . $locale->text('July') . qq|
+ . $locale->text('August') . qq|
+ . $locale->text('September') . qq|
+ . $locale->text('October') . qq|
+ . $locale->text('November') . qq|
|;
+ . $locale->text('December') . qq||;
$form->{allequartale} =
qq|
+ . $locale->text('III') . qq|
|;
+ . $locale->text('IV') . qq||;
+ $form->{"jsscript"} = 1;
$form->header;
print qq|
@@ -210,27 +200,26 @@ sub export_bewegungsdaten {
@@ -240,6 +229,10 @@ sub export_bewegungsdaten {
+| . $form->write_trigger(\%myconfig, 2,
+ "transdatefrom", "BL", "trigger_transdatefrom",
+ "transdateto", "BL", "trigger_transdateto") . qq|
+
@@ -340,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("