- # shorten strings
- if ($row->{belegfeld1}) {
- $row->{buchungsbes} = $row->{belegfeld1} if $row->{belegfeld1};
- $row->{belegfeld1} = substr($row->{belegfeld1}, 0, 12);
- $row->{buchungsbes} = substr($row->{buchungsbes}, 0, 60);
- }
-
- $row->{datum} = DateTime->from_kivitendo($row->{datum})->strftime('%d%m');
-
- $row->{kost1} = substr($row->{kost1}, 0, 8) if $row->{kost1};
- $row->{kost2} = substr($row->{kost2}, 0, 8) if $row->{kost2};
-
- # , as decimal point and trim for UstID
- $row->{umsatz} = _format_amount($row->{umsatz});
- $row->{ustid} =~ s/\s//g if $row->{ustid}; # trim whitespace
-
+ # 1. check all datev_lines and see if we have a defined value
+ # 2. if we don't have a defined value set a default if exists
+ # 3. otherwise die