Revision 5d2ede53
Von Bernd Bleßmann vor fast 4 Jahren hinzugefügt
SL/WH.pm | ||
---|---|---|
|
||
my $where_clause = @filter_ary ? join(" AND ", @filter_ary) . " AND " : '';
|
||
|
||
my ($cvar_where, @cvar_values) = CVar->build_filter_query(
|
||
module => 'IC',
|
||
trans_id_field => 'p.id',
|
||
filter => $form,
|
||
sub_module => undef,
|
||
);
|
||
|
||
if ($cvar_where) {
|
||
$where_clause .= qq| ($cvar_where) AND |;
|
||
push @filter_vars, @cvar_values;
|
||
}
|
||
|
||
$select_tokens{'trans'} = {
|
||
"parts_id" => "i1.parts_id",
|
||
"qty" => "ABS(SUM(i1.qty))",
|
||
... | ... | |
( grep( { !/qty/ and !/^l_cvar/ and /^l_/ and $form->{$_} eq 'Y' } keys %$form),
|
||
qw(l_parts_id l_qty l_partunit) );
|
||
|
||
my ($cvar_where, @cvar_values) = CVar->build_filter_query(
|
||
module => 'IC',
|
||
trans_id_field => 'p.id',
|
||
filter => $form,
|
||
sub_module => undef,
|
||
);
|
||
|
||
if ($cvar_where) {
|
||
$where_clause .= qq| AND ($cvar_where)|;
|
||
push @filter_vars, @cvar_values;
|
||
}
|
||
|
||
my $query =
|
||
qq|SELECT * FROM ( SELECT $select_clause
|
||
FROM inventory i
|
bin/mozilla/wh.pl | ||
---|---|---|
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
|
||
|
||
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
||
(undef,
|
||
($form->{CUSTOM_VARIABLES_FILTER_CODE},
|
||
$form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $cvar_configs,
|
||
'include_prefix' => 'l_',
|
||
'include_value' => 'Y');
|
||
... | ... | |
|
||
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
||
my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
|
||
my @searchable_custom_variables = grep { $_->{searchable} } @{ $cvar_configs };
|
||
push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
|
||
|
||
my @hidden_variables = map { "l_${_}" } @columns;
|
||
push @hidden_variables, qw(warehouse_id bin_id partnumber description chargenumber bestbefore qty_op qty qty_unit unit partunit fromdate todate transtype_ids comment projectnumber);
|
||
push @hidden_variables, qw(classification_id);
|
||
push @hidden_variables, map({'cvar_'. $_->{name}} @searchable_custom_variables);
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables));
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_to'} grep({$_->{type} eq 'date'} @searchable_custom_variables));
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables));
|
||
|
||
my %column_defs = (
|
||
'ids' => { raw_header_data => checkbox_tag("", id => "check_all", checkall => "[data-checkall=1]") },
|
||
... | ... | |
show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} });
|
||
|
||
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
||
(undef,
|
||
($form->{CUSTOM_VARIABLES_FILTER_CODE},
|
||
$form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $cvar_configs,
|
||
'include_prefix' => 'l_',
|
||
'include_value' => 'Y');
|
||
... | ... | |
|
||
my $cvar_configs = CVar->get_configs('module' => 'IC');
|
||
my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
|
||
my @searchable_custom_variables = grep { $_->{searchable} } @{ $cvar_configs };
|
||
push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables;
|
||
|
||
my @hidden_variables = map { "l_${_}" } @columns;
|
||
push @hidden_variables, qw(warehouse_id bin_id partnumber partstypes_id description chargenumber bestbefore qty_op qty qty_unit partunit l_warehousedescription l_bindescription);
|
||
push @hidden_variables, qw(include_empty_bins subtotal include_invalid_warehouses date);
|
||
push @hidden_variables, qw(classification_id stock_value_basis allrows);
|
||
push @hidden_variables, map({'cvar_'. $_->{name}} @searchable_custom_variables);
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables));
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_to'} grep({$_->{type} eq 'date'} @searchable_custom_variables));
|
||
push @hidden_variables, map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables));
|
||
|
||
my %column_defs = (
|
||
'warehousedescription' => { 'text' => $locale->text('Warehouse'), },
|
templates/webpages/wh/journal_filter.html | ||
---|---|---|
[% L.date_tag('todate') %]
|
||
</td>
|
||
</tr>
|
||
[% CUSTOM_VARIABLES_FILTER_CODE %]
|
||
</table>
|
||
</td>
|
||
</tr>
|
templates/webpages/wh/report_filter.html | ||
---|---|---|
[% L.input_number_tag("per_page", 20, size=4) %]
|
||
</td>
|
||
</tr>
|
||
[% CUSTOM_VARIABLES_FILTER_CODE %]
|
||
</table>
|
||
</td>
|
||
</tr>
|
Auch abrufbar als: Unified diff
Lagerberichte nach Waren-CVars filtern können …
… nur Waren-CVars aus den Stammdaten - nicht aus Überlagerung aus Belegen
Übernahme aus Kundenprojekt