X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5ee61c6f50909a5dd120a2b09df081823a49bef9..ea6ec9c1f72a4d30387aec5e771eb38dfdb7fb2a:/bin/mozilla/wh.pl diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 017e4a249..8f55b015f 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -790,8 +790,11 @@ sub report { show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); - my $CVAR_CONFIGS = SL::DB::Manager::CustomVariableConfig->get_all_sorted(where => [ module => 'IC' ]); - my $INCLUDABLE_CVAR_CONFIGS = [ grep { $_->includeable } @{ $CVAR_CONFIGS } ]; + my $cvar_configs = CVar->get_configs('module' => 'IC'); + (undef, + $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $cvar_configs, + 'include_prefix' => 'l_', + 'include_value' => 'Y'); $form->{title} = $locale->text("Report about warehouse contents"); @@ -801,8 +804,6 @@ sub report { print $form->parse_html_template("wh/report_filter", { "WAREHOUSES" => $form->{WAREHOUSES}, "UNITS" => AM->unit_select_data(AM->retrieve_units(\%myconfig, $form)), - # "CVAR_CONFIGS" => $CVAR_CONFIGS, # nyi searchable cvars - "INCLUDABLE_CVAR_CONFIGS" => $INCLUDABLE_CVAR_CONFIGS, }); $main::lxdebug->leave_sub(); @@ -916,10 +917,11 @@ sub generate_report { 'list_price' => { 'text' => $locale->text('List Price'), }, ); + my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @includeable_custom_variables; + %column_defs = (%column_defs, %column_defs_cvars); + my $href = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables); $href .= "&maxrows=".$form->{maxrows}; - my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @includeable_custom_variables; - %column_defs = (%column_defs, %column_defs_cvars); map { $column_defs{$_}->{link} = $href . "&page=".$page."&sort=${_}&order=" . Q($_ eq $sort_col ? 1 - $form->{order} : $form->{order}) } @columns;