projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kundenstatistik: POD Syntaxfehler behoben
[kivitendo-erp.git]
/
bin
/
mozilla
/
datev.pl
diff --git
a/bin/mozilla/datev.pl
b/bin/mozilla/datev.pl
index
e5c048b
..
cca078b
100644
(file)
--- a/
bin/mozilla/datev.pl
+++ b/
bin/mozilla/datev.pl
@@
-78,6
+78,11
@@
sub export_bewegungsdaten {
$::form->header;
$::form->{ALL_DEPARTMENTS} = SL::DB::Manager::Department->get_all_sorted;
$::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;
print $::form->parse_html_template('datev/export_bewegungsdaten');
$::lxdebug->leave_sub;
@@
-101,7
+106,7
@@
sub export3 {
my %data = (
exporttype => $::form->{exporttype} ? DATEV_ET_STAMM : DATEV_ET_BUCHUNGEN,
my %data = (
exporttype => $::form->{exporttype} ? DATEV_ET_STAMM : DATEV_ET_BUCHUNGEN,
- format => $::form->{
kne} ? DATEV_FORMAT_KNE : $::form->{csv} ? DATEV_FORMAT_CSV : die "unknown format"
,
+ format => $::form->{
exportformat} eq 'kne' ? DATEV_FORMAT_KNE : DATEV_FORMAT_CSV
,
);
if ($::form->{exporttype} == DATEV_ET_STAMM) {
);
if ($::form->{exporttype} == DATEV_ET_STAMM) {
@@
-112,6
+117,8
@@
sub export3 {
$::form->{zeitraum}, $::form->{monat}, $::form->{quartal},
$::form->{transdatefrom}, $::form->{transdateto},
);
$::form->{zeitraum}, $::form->{monat}, $::form->{quartal},
$::form->{transdatefrom}, $::form->{transdateto},
);
+ $data{use_pk} = $::form->{use_pk};
+ $data{locked} = $::form->{locked};
} else {
die 'invalid exporttype';
}
} else {
die 'invalid exporttype';
}
@@
-193,6
+200,9
@@
sub _get_dates {
if ($mode eq "monat") {
$fromdate = DateTime->new(day => 1, month => $month, year => DateTime->today->year);
if ($mode eq "monat") {
$fromdate = DateTime->new(day => 1, month => $month, year => DateTime->today->year);
+ # december export is usually in january/february
+ $fromdate = $fromdate->subtract(years => 1) if ($month == 12);
+
$todate = $fromdate->clone->add(months => 1)->add(days => -1);
} elsif ($mode eq "quartal") {
die 'quarter out of of bounds' if $quarter < 1 || $quarter > 4;
$todate = $fromdate->clone->add(months => 1)->add(days => -1);
} elsif ($mode eq "quartal") {
die 'quarter out of of bounds' if $quarter < 1 || $quarter > 4;