X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fdatev.pl;h=06393376766dd599aa976a4601bc9903899d8edd;hb=ab1df08bfae3ef3361c7b5e4e16d91ae3cb34961;hp=01c519d7b9495197d8d26fc40bebf6458cc15949;hpb=0576299f2aa98125991c4ffcd2f75073ea583d7d;p=kivitendo-erp.git
diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl
index 01c519d7b..063933767 100644
--- a/bin/mozilla/datev.pl
+++ b/bin/mozilla/datev.pl
@@ -25,13 +25,19 @@
#
#======================================================================
+use POSIX qw(strftime getcwd);
+use Archive::Zip qw(:ERROR_CODES :CONSTANTS);
+
+use SL::Common;
use SL::DATEV;
1;
# end of main
-sub continue { &{ $form->{nextsub} } }
+require "bin/mozilla/common.pl";
+
+sub continue { call_sub($form->{"nextsub"}); }
sub export {
$lxdebug->enter_sub();
@@ -76,27 +82,25 @@ sub export {
| . $locale->text("Mandantennummer") . qq| |
|
- | . $locale->text("Datenträgernummer") . qq| |
+ | . $locale->text("Medium Number") . qq| |
|
- |
- . $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|
|
@@ -109,7 +113,6 @@ sub export {
-{path}>
{login}>
{password}>
@@ -145,38 +148,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 +201,26 @@ sub export_bewegungsdaten {
@@ -240,6 +230,10 @@ sub export_bewegungsdaten {
+| . $form->write_trigger(\%myconfig, 2,
+ "transdatefrom", "BL", "trigger_transdatefrom",
+ "transdateto", "BL", "trigger_transdateto") . qq|
+
@@ -253,7 +247,6 @@ sub export_bewegungsdaten {
-{path}>
{login}>
{password}>
@@ -319,7 +312,6 @@ sub export_stammdaten {
-{path}>
{login}>
{password}>
@@ -340,14 +332,65 @@ sub export3 {
DATEV->save_datev_stamm(\%myconfig, \%$form);
+ my $link = $form->{"script"} . "?";
+ map({ $link .= "${_}=" . $form->escape($form->{$_}) . "&"; } qw(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("