From 22efeff952c4fd1f9bdec993f5c74972f6d432e3 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 6 May 2009 09:32:10 +0000 Subject: [PATCH] Query zur besseren Lesbarkeit formartiert. --- SL/RP.pm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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}') |; } -- 2.20.1