X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/15cc71490ce1c9981ed31d691a33b20899971384..5b5fc3ca94e10e9e29591e31358e66ea8f8db14e:/bin/mozilla/datev.pl diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl index 8604da00d..8d18281ee 100644 --- a/bin/mozilla/datev.pl +++ b/bin/mozilla/datev.pl @@ -32,6 +32,7 @@ use Archive::Zip qw(:ERROR_CODES :CONSTANTS); use SL::Common; use SL::DATEV qw(:CONSTANTS); use SL::Locale::String qw(t8); +use SL::DB::Department; use strict; @@ -76,6 +77,12 @@ sub export_bewegungsdaten { setup_datev_export2_action_bar(); $::form->header; + $::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted; + $::form->{show_pk_option} = SL::DATEV->new->check_vcnumbers_are_valid_pk_numbers; + + # check if we have mismatching number length domains + SL::DATEV->new->check_valid_length_of_accounts; + print $::form->parse_html_template('datev/export_bewegungsdaten'); $::lxdebug->leave_sub; @@ -99,7 +106,7 @@ sub export3 { my %data = ( exporttype => $::form->{exporttype} ? DATEV_ET_STAMM : DATEV_ET_BUCHUNGEN, - format => $::form->{kne} ? DATEV_FORMAT_KNE : DATEV_FORMAT_OBE, + format => $::form->{exportformat} eq 'kne' ? DATEV_FORMAT_KNE : DATEV_FORMAT_CSV, ); if ($::form->{exporttype} == DATEV_ET_STAMM) { @@ -110,6 +117,7 @@ sub export3 { $::form->{zeitraum}, $::form->{monat}, $::form->{quartal}, $::form->{transdatefrom}, $::form->{transdateto}, ); + $data{use_pk} = $::form->{use_pk}; } else { die 'invalid exporttype'; } @@ -125,7 +133,7 @@ sub export3 { setup_datev_export3_action_bar(download_token => $datev->download_token); $::form->header; - print $::form->parse_html_template('datev/export3'); + print $::form->parse_html_template('datev/export3', { WARNINGS => $datev->warnings }); } else { $::form->error("Export schlug fehl.\n" . join "\n", $datev->errors); }