From 60d62c9e8923f671ac1c2eb9318cf78789787e1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sat, 4 Feb 2012 17:20:31 +0100 Subject: [PATCH] =?utf8?q?Ung=C3=BCltige=20Lager=20aus=20dem=20Warenbestan?= =?utf8?q?d=20filtern?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Setzt man Lager auf ungültig, so werden diese in der Auswahlliste bei Lagerbestand und bei Lagerbewegungen rausgefiltert, lässt man die Auswahl allerdings leer, so werden auch ungültige Lager inkl. Bestand angezeigt. Zumindestens für Bestand einen entsprechenden Filter gesetzt. --- SL/WH.pm | 3 +++ bin/mozilla/wh.pl | 4 ++-- locale/de/all | 1 + templates/webpages/wh/report_filter.html | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SL/WH.pm b/SL/WH.pm index eb3762682..cc53427c5 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -626,6 +626,9 @@ sub get_warehouse_report { push @filter_ary, "i.itime <= ?"; push @filter_vars, $filter{date}; } + if (!$filter{include_invalid_warehouses}){ + push @filter_ary, "NOT (w.invalid)"; + } # prepare qty comparison for later filtering my ($f_qty_op, $f_qty, $f_qty_base_unit); diff --git a/bin/mozilla/wh.pl b/bin/mozilla/wh.pl index 62be1d1d7..b3550b253 100644 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@ -824,7 +824,7 @@ sub generate_report { my @columns = qw(warehousedescription bindescription partnumber partdescription chargenumber bestbefore qty stock_value); # filter stuff - map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore date); + map { $filter{$_} = $form->{$_} if ($form->{$_}) } qw(warehouse_id bin_id partnumber description chargenumber bestbefore date include_invalid_warehouses); $filter{qty_op} = WH->convert_qty_op($form->{qty_op}); if ($filter{qty_op}) { @@ -842,7 +842,7 @@ sub generate_report { my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, qw(warehouse_id bin_id partnumber description chargenumber bestbefore qty_op qty qty_unit l_warehousedescription l_bindescription); - push @hidden_variables, qw(include_empty_bins subtotal); + push @hidden_variables, qw(include_empty_bins subtotal include_invalid_warehouses); my %column_defs = ( 'warehousedescription' => { 'text' => $locale->text('Warehouse'), }, diff --git a/locale/de/all b/locale/de/all index 8b5a09482..7b1e4abbb 100644 --- a/locale/de/all +++ b/locale/de/all @@ -939,6 +939,7 @@ $self->{texts} = { 'Include empty bins' => 'Leere Lagerplätze anzeigen', 'Include in Report' => 'In Bericht aufnehmen', 'Include in drop-down menus' => 'In Aufklappmenü aufnehmen', + 'Include invalid warehouses ' => 'Ungültige Lager berücksichtigen', 'Includeable in reports' => 'In Berichten anzeigbar', 'Including' => 'Enthaltene', 'Income Statement' => 'GuV', diff --git a/templates/webpages/wh/report_filter.html b/templates/webpages/wh/report_filter.html index a5cbe12d8..53d0842e9 100644 --- a/templates/webpages/wh/report_filter.html +++ b/templates/webpages/wh/report_filter.html @@ -175,6 +175,8 @@ + + -- 2.20.1