From: Sven Schöling Date: Thu, 14 May 2009 13:03:15 +0000 (+0000) Subject: aliased subqueries müssen mit ihrem alias im group by stehen. X-Git-Tag: release-2.6.0rc1~64 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9d2ac13b7b318be0540c6fc5d96b412e8c7bab02;p=kivitendo-erp.git aliased subqueries müssen mit ihrem alias im group by stehen. Fix für Bug 983. --- diff --git a/SL/IC.pm b/SL/IC.pm index 80781b7f7..f691a354f 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -914,6 +914,7 @@ sub all_parts { if ($form->{l_soldtotal}) { push @where_tokens, 'ioi.qty >= 0'; push @group_tokens, @select_tokens; + map { s/.*\sAS\s+//si } @group_tokens; push @select_tokens, 'SUM(ioi.qty)'; } @@ -927,6 +928,7 @@ sub all_parts { ordnumber => 'apoe.', make => 'mm.', quonumber => 'apoe.', model => 'mm.', invnumber => 'apoe.', partsgroup => 'pg.', + lastcost => ' ', factor => 'pfac.', 'SUM(ioi.qty)' => ' ', );