X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/5b5fc3ca94e10e9e29591e31358e66ea8f8db14e..cea7e7c53f1005f6143edbddb5832b6c48b5dc8e:/bin/mozilla/datev.pl diff --git a/bin/mozilla/datev.pl b/bin/mozilla/datev.pl index 8d18281ee..cca078b66 100644 --- a/bin/mozilla/datev.pl +++ b/bin/mozilla/datev.pl @@ -118,6 +118,7 @@ sub export3 { $::form->{transdatefrom}, $::form->{transdateto}, ); $data{use_pk} = $::form->{use_pk}; + $data{locked} = $::form->{locked}; } else { die 'invalid exporttype'; } @@ -199,6 +200,9 @@ sub _get_dates { 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;