Revision 2f6e7625
Von Jan Büren vor mehr als 11 Jahren hinzugefügt
SL/DATEV.pm | ||
---|---|---|
353 | 353 |
|
354 | 354 |
my $query = |
355 | 355 |
qq|SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ar.id, ac.amount, ac.taxkey, |
356 |
ar.invnumber, ar.duedate, ar.amount as umsatz, |
|
356 |
ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate,
|
|
357 | 357 |
ct.name, |
358 | 358 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
359 | 359 |
ar.invoice |
... | ... | |
368 | 368 |
UNION ALL |
369 | 369 |
|
370 | 370 |
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,ap.id, ac.amount, ac.taxkey, |
371 |
ap.invnumber, ap.duedate, ap.amount as umsatz, |
|
371 |
ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate,
|
|
372 | 372 |
ct.name, |
373 | 373 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
374 | 374 |
ap.invoice |
... | ... | |
383 | 383 |
UNION ALL |
384 | 384 |
|
385 | 385 |
SELECT ac.acc_trans_id, ac.transdate, ac.trans_id,gl.id, ac.amount, ac.taxkey, |
386 |
gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, |
|
386 |
gl.reference AS invnumber, gl.transdate AS duedate, ac.amount as umsatz, NULL as deliverydate,
|
|
387 | 387 |
gl.description AS name, |
388 | 388 |
c.accno, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link, |
389 | 389 |
FALSE AS invoice |
... | ... | |
528 | 528 |
push @{ $self->{DATEV} }, [ \%new_trans, $trans->[$j] ]; |
529 | 529 |
|
530 | 530 |
} elsif (($j != $notsplitindex) && !$trans->[$j]->{is_tax}) { |
531 |
my %tax_info = $taxkeys->get_full_tax_info('transdate' => $trans->[$j]->{transdate}); |
|
531 |
my %tax_info = $taxkeys->get_full_tax_info('transdate' => $trans->[$j]->{transdate}, |
|
532 |
'deliverydate' => $trans->[$j]->{deliverydate}); |
|
532 | 533 |
|
533 | 534 |
my %new_trans = (); |
534 | 535 |
map { $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys %{ $trans->[$notsplitindex] }; |
Auch abrufbar als: Unified diff
Beim DATEV-Export Lieferdatum als entscheidenden Tag zur Bestimmung der Steuer berücksichtigen
Analog wie bei Einkaufs- und Verkaufsbelegen wird jetzt auch beim DATEV-Export
das Lieferdatum der Transaktion verwendet.