From: Jan Büren Date: Sat, 4 Feb 2012 16:20:31 +0000 (+0100) Subject: Ungültige Lager aus dem Warenbestand filtern X-Git-Tag: release-2.7.0beta1~10^2~8 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=60d62c9e8923f671ac1c2eb9318cf78789787e1c;p=kivitendo-erp.git Ungültige Lager aus dem Warenbestand filtern 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. --- 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 @@ + +