Revision 2791faa4
Von Jan Büren vor mehr als 1 Jahr hinzugefügt
SL/BackgroundJob/SelfTest/Transactions.pm | ||
---|---|---|
570 | 570 |
my $query = qq| |
571 | 571 |
select sum(ac.amount) as paid_amount, ar.invnumber,ar.paid |
572 | 572 |
from acc_trans ac left join ar on (ac.trans_id = ar.id) |
573 |
WHERE ac.chart_link like '%AR_paid%' OR ac.fx_transaction
|
|
573 |
WHERE (ac.chart_link like '%AR_paid%' OR ac.fx_transaction)
|
|
574 | 574 |
AND ac.trans_id in (SELECT trans_id from acc_trans ac where ac.transdate >= ? AND ac.transdate <= ?) |
575 | 575 |
group by invnumber, paid having sum(ac.amount) <> ar.paid*-1|; |
576 | 576 |
|
Auch abrufbar als: Unified diff
SelfTest: logische Klammer vergessen
Ansonsten wird die UND Verknüpfung über den Zeitraum nicht beachtet