X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fwh.pl;h=c3aa1f03a2684479b6fd76eecb20f74abaa6ef8f;hb=094307a8ce3e7680a5b14ef17b5c1094a2555009;hp=b8cda2b2cd2012a059b251efe4d9c7b011299341;hpb=891f62176912eb5c1e8864a1140635e4ad533d08;p=kivitendo-erp.git diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index b8cda2b2c..c3aa1f03a 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -829,6 +829,26 @@ sub generate_report { # filter stuff map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore date include_invalid_warehouses); + # show filter stuff also in report + my @options; + # dispatch all options + my $dispatch_options = { + warehouse_id => sub { push @options, $locale->text('Warehouse') . " : " . + SL::DB::Manager::Warehouse->find_by(id => $form->{warehouse_id})->description}, + bin_id => sub { push @options, $locale->text('Bin') . " : " . + SL::DB::Manager::Bin->find_by(id => $form->{bin_id})->description}, + partnumber => sub { push @options, $locale->text('Partnumber') . " : $form->{partnumber}"}, + description => sub { push @options, $locale->text('Description') . " : $form->{description}"}, + chargenumber => sub { push @options, $locale->text('Charge Number') . " : $form->{chargenumber}"}, + bestbefore => sub { push @options, $locale->text('Best Before') . " : $form->{bestbefore}"}, + date => sub { push @options, $locale->text('Date') . " : $form->{date}"}, + include_invalid_warehouses => sub { push @options, $locale->text('Include invalid warehouses ')}, + }; + foreach (keys %filter) { + $dispatch_options->{$_}->() if $dispatch_options->{$_}; + } + # / end show filter stuff also in report + $filter{qty_op} = WH->convert_qty_op($form->{qty_op}); if ($filter{qty_op}) { $form->isblank("qty", $locale->text('Quantity missing.')); @@ -872,7 +892,8 @@ sub generate_report { $report->set_sort_indicator($sort_col, $form->{order}); - $report->set_options('output_format' => 'HTML', + $report->set_options('top_info_text' => join("\n", @options), + 'output_format' => 'HTML', 'title' => $form->{title}, 'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time)); $report->set_options_from_form();