Revision 621b7576
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/WH.pm | ||
---|---|---|
656 | 656 |
( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form), |
657 | 657 |
qw(l_parts_id l_qty l_partunit) ); |
658 | 658 |
|
659 |
# add cvar for sorting |
|
660 |
if ($form->{sort} =~ /^cvar_/) { |
|
661 |
my $sort_name = $form->{sort}; |
|
662 |
my $cvar_name = $sort_name; |
|
663 |
$cvar_name =~ s/^cvar_//; |
|
664 |
|
|
665 |
$select_clause .= ", cvar_fields.$sort_name"; |
|
666 |
$group_clause .= ", cvar_fields.$sort_name"; |
|
667 |
$joins .= qq| |
|
668 |
LEFT JOIN ( |
|
669 |
SELECT text_value as $sort_name, trans_id |
|
670 |
FROM custom_variable_configs cvar_cfg |
|
671 |
LEFT JOIN custom_variables cvar |
|
672 |
ON (cvar_cfg.module = 'IC' AND cvar_cfg.name = '$cvar_name' |
|
673 |
AND cvar_cfg.id = cvar.config_id) |
|
674 |
) cvar_fields ON (cvar_fields.trans_id = p.id) |
|
675 |
|; |
|
676 |
} |
|
677 |
|
|
659 | 678 |
my ($cvar_where, @cvar_values) = CVar->build_filter_query( |
660 | 679 |
module => 'IC', |
661 | 680 |
trans_id_field => 'p.id', |
Auch abrufbar als: Unified diff
Lagerbestand nach textartigen BDVs sortieren