X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/c954dea7c1b814d66b8c31d04fa70a1bbbcce71e..7cd6d451d97d1f1e7f3c0f9db2de03735dc8c8f0:/SL/IR.pm diff --git a/SL/IR.pm b/SL/IR.pm index a424ab990..f3f1fd0ca 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -817,19 +817,13 @@ SQL # safety check datev export if ($::instance_conf->get_datev_check_on_purchase_invoice) { - # if we need department for kostenstelle in DATEV check - $form->{department} = SL::DB::Manager::Department->find_by(id => $form->{department_id})->description if $form->{department_id}; - my $transdate = $::form->{invdate} ? DateTime->from_lxoffice($::form->{invdate}) : 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;