From 39b80fd29481037c6a376bd5517d7d50c9ff431d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 18 May 2016 10:39:32 +0200 Subject: [PATCH] SelfTests verbessert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Eingangsrechnungen können und dürfen diesselbe Rechnungsnummer haben, entsprechend beim group by berücksichtigt. Ferner amount auf Zahlungsausgangskonto und nicht Zahlungseingangskonten berücksichtigt. --- SL/BackgroundJob/SelfTest/Transactions.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/BackgroundJob/SelfTest/Transactions.pm b/SL/BackgroundJob/SelfTest/Transactions.pm index ca7e278c9..b61311fa1 100644 --- a/SL/BackgroundJob/SelfTest/Transactions.pm +++ b/SL/BackgroundJob/SelfTest/Transactions.pm @@ -474,9 +474,9 @@ sub check_ap_acc_trans_amount { my $query = qq| select sum(ac.amount) as amount, ap.invnumber,ap.netamount from acc_trans ac left join ap on (ac.trans_id = ap.id) - WHERE ac.chart_link like 'AR_amount%' + WHERE ac.chart_link like '%AP_amount%' AND ac.transdate >= ? AND ac.transdate <= ? - group by invnumber,netamount having sum(ac.amount) <> ap.netamount*-1|; + group by invnumber,trans_id,netamount having sum(ac.amount) <> ap.netamount*-1|; my $ap_amount_not_ac_amount = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); -- 2.20.1