From 572fafbe65877a32fad8954e2636db5eded35465 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 14 May 2009 09:58:28 +0000 Subject: [PATCH] Weniger Perversion, mehr andere Perversion. --- SL/IC.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/IC.pm b/SL/IC.pm index dd4790943..80781b7f7 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -931,6 +931,8 @@ sub all_parts { 'SUM(ioi.qty)' => ' ', ); + $table_prefix{$q_assembly_lastcost} = ' '; + my %renamed_columns = ( 'factor' => 'price_factor', 'SUM(ioi.qty)' => 'soldtotal', @@ -939,7 +941,7 @@ sub all_parts { map { $table_prefix{$_} = 'ioi.' } qw(description serialnumber qty unit) if $joins_needed{invoice_oi}; map { $renamed_columns{$_} = ' AS ' . $renamed_columns{$_} } keys %renamed_columns; - my $select_clause = join ', ', map { ((substr($_, 0, 1) eq '(') ? '' : $table_prefix{$_} || "p.") . $_ . $renamed_columns{$_} } @select_tokens; + my $select_clause = join ', ', map { ($table_prefix{$_} || "p.") . $_ . $renamed_columns{$_} } @select_tokens; my $join_clause = join ' ', @joins{ grep $joins_needed{$_}, @join_order }; my $where_clause = join ' AND ', map { "($_)" } @where_tokens; my $group_clause = ' GROUP BY ' . join ', ', map { ($table_prefix{$_} || "p.") . $_ } @group_tokens if scalar @group_tokens; -- 2.20.1