From 96aa399e04832dae8c16d8159be230b313211b83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 27 Apr 2021 12:44:12 +0200 Subject: [PATCH] =?utf8?q?CVars=20f=C3=BCr=20Lagerbestand=20auch=20in=20hi?= =?utf8?q?ddens=20f=C3=BCr=20den=20Export?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/wh.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index d2bbf9b17..2e812f31f 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -870,6 +870,9 @@ sub generate_report { my $report = SL::ReportGenerator->new(\%myconfig, $form); + my @includeable_custom_variables = grep { $_->{includeable} } @{ $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); @@ -892,9 +895,7 @@ sub generate_report { my $href = build_std_url('action=generate_report', grep { $form->{$_} } @hidden_variables); $href .= "&maxrows=".$form->{maxrows}; - my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; my %column_defs_cvars = map { +"cvar_$_->{name}" => { 'text' => $_->{description} } } @includeable_custom_variables; - push @columns, map { "cvar_$_->{name}" } @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; -- 2.20.1