Revision c6be179d
Von Jan Büren vor etwa 11 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
366 | 366 |
my $query = |
367 | 367 |
qq|SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey, |
368 | 368 |
ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate, |
369 |
ct.name, |
|
369 |
ct.name, ct.ustid,
|
|
370 | 370 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
371 | 371 |
ar.invoice, |
372 | 372 |
t.rate AS taxrate |
... | ... | |
384 | 384 |
|
385 | 385 |
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey, |
386 | 386 |
ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate, |
387 |
ct.name, |
|
387 |
ct.name,ct.ustid,
|
|
388 | 388 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
389 | 389 |
ap.invoice, |
390 | 390 |
t.rate AS taxrate |
... | ... | |
402 | 402 |
|
403 | 403 |
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey, |
404 | 404 |
gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, NULL as deliverydate, |
405 |
gl.description AS name, |
|
405 |
gl.description AS name, NULL as ustid,
|
|
406 | 406 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
407 | 407 |
FALSE AS invoice, |
408 | 408 |
t.rate AS taxrate |
... | ... | |
810 | 810 |
my $datevautomatik = 0; |
811 | 811 |
my $taxkey = 0; |
812 | 812 |
my $charttax = 0; |
813 |
my $ustid =""; |
|
813 | 814 |
my ($haben, $soll); |
814 | 815 |
my $iconv = $::locale->{iconv_utf8}; |
815 | 816 |
my %umlaute = ($iconv->convert('ä') => 'ae', |
... | ... | |
844 | 845 |
$soll = $i; |
845 | 846 |
} |
846 | 847 |
} |
847 |
|
|
848 | 848 |
# Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern |
849 | 849 |
foreach my $umlaut (keys(%umlaute)) { |
850 | 850 |
$transaction->[$haben]->{'invnumber'} =~ s/${umlaut}/${umlaute{$umlaut}}/g; |
... | ... | |
872 | 872 |
if ($transaction->[$haben]->{'name'} ne "") { |
873 | 873 |
$buchungstext = "\x1E" . $transaction->[$haben]->{'name'} . "\x1C"; |
874 | 874 |
} |
875 |
if ($transaction->[$haben]->{'ustid'} ne "") { |
|
876 |
$ustid = "\xBA" . $transaction->[$haben]->{'ustid'} . "\x1C"; |
|
877 |
} |
|
875 | 878 |
if ($transaction->[$haben]->{'duedate'} ne "") { |
876 | 879 |
$belegfeld2 = "\xBE" . &datetofour($transaction->[$haben]->{'duedate'}, 1) . "\x1C"; |
877 | 880 |
} |
... | ... | |
903 | 906 |
$kne_file->add_block($datum); |
904 | 907 |
$kne_file->add_block($konto); |
905 | 908 |
$kne_file->add_block($buchungstext); |
909 |
$kne_file->add_block($ustid); |
|
906 | 910 |
$kne_file->add_block($waehrung . "\x79"); |
907 | 911 |
} |
908 | 912 |
|
Auch abrufbar als: Unified diff
Ust-id beim DATEV-Export mit übergeben