Revision b4cc5e2a
Von Jan Büren vor mehr als 8 Jahren hinzugefügt
SL/BackgroundJob/SelfTest/Transactions.pm | ||
---|---|---|
500 | 500 |
# check tax bookings. all taxkey <> 0 should have tax bookings in acc_trans |
501 | 501 |
|
502 | 502 |
my $query = qq| select trans_id, chart.accno,transdate from acc_trans left join chart on (chart.id = acc_trans.chart_id) |
503 |
WHERE taxkey <> 0 AND trans_id NOT IN
|
|
503 |
WHERE taxkey NOT IN (SELECT taxkey from tax where rate=0) AND trans_id NOT IN
|
|
504 | 504 |
(select trans_id from acc_trans where chart_link ilike '%tax%' and trans_id IN |
505 |
(SELECT trans_id from acc_trans where taxkey <> 0))
|
|
505 |
(SELECT trans_id from acc_trans where taxkey NOT IN (SELECT taxkey from tax where rate=0)))
|
|
506 | 506 |
AND transdate >= ? AND transdate <= ?|; |
507 | 507 |
|
508 | 508 |
my $missing_tax_bookings = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); |
Auch abrufbar als: Unified diff
SelfTests Buchungen ohne Steuer auch mit Steuerschlüssel 11, etc filtern
Nicht nur Steuerschlüssel 0 kann steuerfrei sein, sondern auch
diverse andere (tax.rate beachten!)