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);
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}) {
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'), },
'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',
<td nowrap><label for="subtotal">[% 'Subtotal' | $T8 %]</label></td>
<td align="right"><input name="include_empty_bins" id="include_empty_bins" class="checkbox" type="checkbox" value="Y"></td>
<td nowrap><label for="include_empty_bins">[% 'Include empty bins' | $T8 %]</label></td>
+ <td align="right"><input name="include_invalid_warehouses" id="include_invalid_warehouses" class="checkbox" type="checkbox" value="Y"></td>
+ <td nowrap><label for="include_invalid_warehouses">[% 'Include invalid warehouses ' | $T8 %]</label></td>
</tr>
<tr>