Revision 572fafbe
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
931 | 931 |
'SUM(ioi.qty)' => ' ', |
932 | 932 |
); |
933 | 933 |
|
934 |
$table_prefix{$q_assembly_lastcost} = ' '; |
|
935 |
|
|
934 | 936 |
my %renamed_columns = ( |
935 | 937 |
'factor' => 'price_factor', |
936 | 938 |
'SUM(ioi.qty)' => 'soldtotal', |
... | ... | |
939 | 941 |
map { $table_prefix{$_} = 'ioi.' } qw(description serialnumber qty unit) if $joins_needed{invoice_oi}; |
940 | 942 |
map { $renamed_columns{$_} = ' AS ' . $renamed_columns{$_} } keys %renamed_columns; |
941 | 943 |
|
942 |
my $select_clause = join ', ', map { ((substr($_, 0, 1) eq '(') ? '' : $table_prefix{$_} || "p.") . $_ . $renamed_columns{$_} } @select_tokens;
|
|
944 |
my $select_clause = join ', ', map { ($table_prefix{$_} || "p.") . $_ . $renamed_columns{$_} } @select_tokens; |
|
943 | 945 |
my $join_clause = join ' ', @joins{ grep $joins_needed{$_}, @join_order }; |
944 | 946 |
my $where_clause = join ' AND ', map { "($_)" } @where_tokens; |
945 | 947 |
my $group_clause = ' GROUP BY ' . join ', ', map { ($table_prefix{$_} || "p.") . $_ } @group_tokens if scalar @group_tokens; |
Auch abrufbar als: Unified diff
Weniger Perversion, mehr andere Perversion.