From: Moritz Bunkus Date: Wed, 6 May 2009 09:32:10 +0000 (+0000) Subject: Query zur besseren Lesbarkeit formartiert. X-Git-Tag: release-2.6.0beta2~30 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=22efeff952c4fd1f9bdec993f5c74972f6d432e3;p=kivitendo-erp.git Query zur besseren Lesbarkeit formartiert. --- diff --git a/SL/RP.pm b/SL/RP.pm index ebc0dd688..e5f432797 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -644,7 +644,27 @@ sub trial_balance { if ($form->{method} eq "cash") { - $acc_cash_where = qq| AND (ac.trans_id IN (SELECT id FROM ar WHERE datepaid>='$form->{fromdate}' AND datepaid<='$form->{todate}' UNION SELECT id FROM ap WHERE datepaid>='$form->{fromdate}' AND datepaid<='$form->{todate}' UNION SELECT id FROM gl WHERE transdate>='$form->{fromdate}' AND transdate<='$form->{todate}')) |; + $acc_cash_where = + qq| AND (ac.trans_id IN ( + SELECT id + FROM ar + WHERE datepaid >= '$form->{fromdate}' + AND datepaid <= '$form->{todate}' + + UNION + + SELECT id + FROM ap + WHERE datepaid >= '$form->{fromdate}' + AND datepaid <= '$form->{todate}' + + UNION + + SELECT id + FROM gl + WHERE transdate >= '$form->{fromdate}' + AND transdate <= '$form->{todate}' + )) |; # $ar_ap_cash_where = qq| AND (a.datepaid>='$form->{fromdate}' AND a.datepaid<='$form->{todate}') |; }