X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDATEV.pm;h=c39ba34074f21e2107f4e205e7456e0c447de92c;hb=ba489e3a63d881ead64a390a7819662abdb052ce;hp=b4cdd839a5b2bc8d3174d517ef57a2bf0e25b38f;hpb=2bc33284e526869f0de7aa0ddd5cdb141432f4e3;p=kivitendo-erp.git diff --git a/SL/DATEV.pm b/SL/DATEV.pm index b4cdd839a..c39ba3407 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -368,13 +368,15 @@ sub generate_datev_data { $main::lxdebug->enter_sub(); my ($self, %params) = @_; - my $fromto = $params{from_to}; + my $fromto = $params{from_to} // ''; my $progress_callback = $params{progress_callback} || sub {}; my $form = $main::form; my $trans_id_filter = ''; - my ($ar_department_id_filter, $ap_department_id_filter, $gl_department_id_filter); + my $ar_department_id_filter = ''; + my $ap_department_id_filter = ''; + my $gl_department_id_filter = ''; if ( $form->{department_id} ) { $ar_department_id_filter = " AND ar.department_id = ? "; $ap_department_id_filter = " AND ap.department_id = ? "; @@ -1200,7 +1202,7 @@ sub csv_export_for_tax_accountant { taxkey => { 'text' => $::locale->text('Taxkey'), }, tax_accname => { 'text' => $::locale->text('Tax Account Name'), }, tax_accno => { 'text' => $::locale->text('Tax Account'), }, - transdate => { 'text' => $::locale->text('Invoice Date'), }, + transdate => { 'text' => $::locale->text('Transdate'), }, vcnumber => { 'text' => $::locale->text('Customer/Vendor Number'), }, ); @@ -1464,6 +1466,25 @@ Returns a list of errors that occured. If no errors occured, the export was a su Exports data. You have to have set L and L or an error will occur. OBE exports are currently not implemented. +=item csv_export_for_tax_accountant + +Generates up to four downloadable csv files containing data about sales and +purchase invoices, and their respective payments: + +Example: + my $startdate = DateTime->new(year => 2012, month => 1, day => 1); + my $enddate = DateTime->new(year => 2012, month => 12, day => 31); + SL::DATEV->new(from => $startdate, to => $enddate)->csv_export_for_tax_accountant; + # { + # 'download_token' => '1488551625-815654-22430', + # 'filenames' => [ + # 'Zahlungen Kreditorenbuchungen 2012-01-01 - 2012-12-31.csv', + # 'Kreditorenbuchungen 2012-01-01 - 2012-12-31.csv', + # 'Zahlungen Debitorenbuchungen 2012-01-01 - 2012-12-31.csv', + # 'Debitorenbuchungen 2012-01-01 - 2012-12-31.csv' + # ] + # }; + =back =head1 ATTRIBUTES