X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/324726acd30b8992854a2d59fec2a50265613eef..b3089c09460c250bfab75cf84c34f4ea958dc2e1:/SL/DATEV.pm diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 51fe4bde5..3766c1b60 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -37,6 +37,7 @@ use SL::DB; use SL::HTML::Util (); use SL::Iconv; use SL::Locale::String qw(t8); +use SL::VATIDNr; use Data::Dumper; use DateTime; @@ -1045,7 +1046,7 @@ sub generate_datev_lines { $datev_data{buchungstext} = $transaction->[$haben]->{'name'}; } if (($transaction->[$haben]->{'ustid'} // '') ne "") { - $datev_data{ustid} = $transaction->[$haben]->{'ustid'}; + $datev_data{ustid} = SL::VATIDNr->normalize($transaction->[$haben]->{'ustid'}); } if (($transaction->[$haben]->{'duedate'} // '') ne "") { $datev_data{belegfeld2} = $transaction->[$haben]->{'duedate'}; @@ -1070,6 +1071,8 @@ sub generate_datev_lines { # $datev_data{buchungsschluessel} = !$datevautomatik ? $taxkey : "4"; $datev_data{buchungsschluessel} = $taxkey; } + # set lock for each transaction + $datev_data{locked} = $self->locked; push(@datev_lines, \%datev_data) if $datev_data{umsatz}; } @@ -1162,7 +1165,7 @@ sub kne_buchungsexport { $name =~ s/\ *$//; $kne_file->add_block("\x1E" . $name . "\x1C"); - $kne_file->add_block("\xBA" . $kne->{'ustid'} . "\x1C") if $kne->{'ustid'}; + $kne_file->add_block("\xBA" . SL::VATIDNr->normalize($kne->{'ustid'}) . "\x1C") if $kne->{'ustid'}; $kne_file->add_block("\xB3" . $kne->{'waehrung'} . "\x1C" . "\x79"); }; @@ -1631,7 +1634,7 @@ Forces a garbage collection on previous exports which will delete all exports th =item errors -Returns a list of errors that occured. If no errors occured, the export was a success. +Returns a list of errors that occurred. If no errors occurred, the export was a success. =item export