X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAR.pm;h=56f2da9dfa61e63b59cd8c4096faf692b1053628;hb=0e04ddd7e3ff23d051838617844698a39f680969;hp=2ca302258d9d0d0a2a17e382f875357d49b730d6;hpb=c954dea7c1b814d66b8c31d04fa70a1bbbcce71e;p=kivitendo-erp.git diff --git a/SL/AR.pm b/SL/AR.pm index 2ca302258..56f2da9df 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -312,17 +312,12 @@ sub _post_transaction { # safety check datev export if ($::instance_conf->get_datev_check_on_ar_transaction) { - my $transdate = $::form->{transdate} ? DateTime->from_lxoffice($::form->{transdate}) : undef; - $transdate ||= DateTime->today; - my $datev = SL::DATEV->new( - exporttype => DATEV_ET_BUCHUNGEN, - format => DATEV_FORMAT_KNE, dbh => $dbh, trans_id => $form->{id}, ); - $datev->export; + $datev->generate_datev_data; if ($datev->errors) { die join "\n", $::locale->text('DATEV check returned errors:'), $datev->errors;