From: Jan Büren Date: Wed, 18 May 2016 08:39:32 +0000 (+0200) Subject: SelfTests verbessert X-Git-Tag: release-3.4.1~140 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=39b80fd29481037c6a376bd5517d7d50c9ff431d;p=kivitendo-erp.git SelfTests verbessert Eingangsrechnungen können und dürfen diesselbe Rechnungsnummer haben, entsprechend beim group by berücksichtigt. Ferner amount auf Zahlungsausgangskonto und nicht Zahlungseingangskonten berücksichtigt. --- 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);