my $dbh = SL::DB->client->dbh;
clear_up();
+
+my $d = SL::DB::Default->get;
+$d->update_attributes(datev_export_format => 'cp1252');
+
my $buchungsgruppe7 = SL::DB::Manager::Buchungsgruppe->find_by(description => 'Standard 7%') || die "No accounting group for 7\%";
my $date = DateTime->new(year => 2017, month => 7, day => 19);
my $department = create_department(description => 'Kästchenweiße heiße Preise');
my @sorted = sort { $a->[0] cmp $b->[0] } @{ $lines_aref };
cmp_deeply $sorted[0], [ '1963,5', 'S', 'EUR', '', '', '',
'1400', '8400', '', '1907', 'meine muh',
- '', '', '', '', '', '', '', '', '',
+ '', '', 'Test customer', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', "K\x{e4}stchen",
'299', '','DE12345678', '', '', '',
];
cmp_deeply $sorted[1], [ '535', 'S', 'EUR', '', '', '',
'1400', '8300', '', '1907','meine muh',
- '', '', '', '', '', '', '', '', '',
+ '', '', 'Test customer', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', "K\x{e4}stchen",
'299', '','DE12345678', '', '', '',
$datev2->from($startdate);
$datev2->to($enddate);
$datev2->generate_datev_data;
-$datev2->generate_datev_lines;
my $datev_csv3 = SL::DATEV::CSV->new(datev_lines => $datev2->generate_datev_lines,
from => $startdate,
);
my @data_csv = sort { $a->[0] cmp $b->[0] } @{ $datev_csv3->lines };
-cmp_deeply($data_csv[0], [ 100, 'S', 'EUR', '', '', '', '4660', '1000', 9, '1703', 'Reise März 2',
- '', '', '', '', '', '', '', '', '', '', '',
+cmp_deeply($data_csv[0], [ '100', 'S', 'EUR', '', '', '', '4660', '1000', 9, '1703', 'Reise März 2',
+ '', '', 'Reisekonsten März 2018 / Ma Schmidt', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '', '', '', '',