Revision c6be179d
Von Jan Büren vor etwa 11 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
my $query =
|
||
qq|SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey,
|
||
ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate,
|
||
ct.name,
|
||
ct.name, ct.ustid,
|
||
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
ar.invoice,
|
||
t.rate AS taxrate
|
||
... | ... | |
|
||
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey,
|
||
ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate,
|
||
ct.name,
|
||
ct.name,ct.ustid,
|
||
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
ap.invoice,
|
||
t.rate AS taxrate
|
||
... | ... | |
|
||
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey,
|
||
gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, NULL as deliverydate,
|
||
gl.description AS name,
|
||
gl.description AS name, NULL as ustid,
|
||
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
FALSE AS invoice,
|
||
t.rate AS taxrate
|
||
... | ... | |
my $datevautomatik = 0;
|
||
my $taxkey = 0;
|
||
my $charttax = 0;
|
||
my $ustid ="";
|
||
my ($haben, $soll);
|
||
my $iconv = $::locale->{iconv_utf8};
|
||
my %umlaute = ($iconv->convert('ä') => 'ae',
|
||
... | ... | |
$soll = $i;
|
||
}
|
||
}
|
||
|
||
# Umwandlung von Umlauten und Sonderzeichen in erlaubte Zeichen bei Textfeldern
|
||
foreach my $umlaut (keys(%umlaute)) {
|
||
$transaction->[$haben]->{'invnumber'} =~ s/${umlaut}/${umlaute{$umlaut}}/g;
|
||
... | ... | |
if ($transaction->[$haben]->{'name'} ne "") {
|
||
$buchungstext = "\x1E" . $transaction->[$haben]->{'name'} . "\x1C";
|
||
}
|
||
if ($transaction->[$haben]->{'ustid'} ne "") {
|
||
$ustid = "\xBA" . $transaction->[$haben]->{'ustid'} . "\x1C";
|
||
}
|
||
if ($transaction->[$haben]->{'duedate'} ne "") {
|
||
$belegfeld2 = "\xBE" . &datetofour($transaction->[$haben]->{'duedate'}, 1) . "\x1C";
|
||
}
|
||
... | ... | |
$kne_file->add_block($datum);
|
||
$kne_file->add_block($konto);
|
||
$kne_file->add_block($buchungstext);
|
||
$kne_file->add_block($ustid);
|
||
$kne_file->add_block($waehrung . "\x79");
|
||
}
|
||
|
Auch abrufbar als: Unified diff
Ust-id beim DATEV-Export mit übergeben