From: Moritz Bunkus Date: Fri, 25 Jul 2008 14:20:37 +0000 (+0000) Subject: SQL-Fehler: Im Query die richtigen Tabellen-Aliase benutzen. Fix für Bug 812. X-Git-Tag: release-2.6.0beta1~24 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=eb693e82824f13052de0e05d8405929a37c286b8;p=kivitendo-erp.git SQL-Fehler: Im Query die richtigen Tabellen-Aliase benutzen. Fix für Bug 812. --- diff --git a/SL/GL.pm b/SL/GL.pm index a101f4a69..4d75fa1bb 100644 --- a/SL/GL.pm +++ b/SL/GL.pm @@ -272,15 +272,9 @@ sub all_transactions { } if ($form->{category} ne 'X') { - $glwhere .= - qq| AND gl.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN - (SELECT id FROM chart c2 WHERE c2.category = ?))|; - $arwhere .= - qq| AND ar.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN - (SELECT id FROM chart c2 WHERE c2.category = ?))|; - $apwhere .= - qq| AND ap.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN - (SELECT id FROM chart c2 WHERE c2.category = ?))|; + $glwhere .= qq| AND g.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = ?))|; + $arwhere .= qq| AND a.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = ?))|; + $apwhere .= qq| AND a.id in (SELECT trans_id FROM acc_trans ac2 WHERE ac2.chart_id IN (SELECT id FROM chart c2 WHERE c2.category = ?))|; push(@glvalues, $form->{category}); push(@arvalues, $form->{category}); push(@apvalues, $form->{category});