X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FWH.pm;h=28e836e485cd22b3a7018b93182b004025c2678f;hb=0f179c9ab60ac22c697027cadc9f4bdb9c515ce5;hp=eb376268222ebeb56c02a5a1821d1dfe7a97fa7f;hpb=9ba3a010bca395410803067324c1924cabf956b4;p=kivitendo-erp.git diff --git a/SL/WH.pm b/SL/WH.pm index eb3762682..28e836e48 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -111,8 +111,7 @@ sub transfer { ); if ($unit) { - $qty *= $unit->factor || 1; - $qty /= $part->unit_obj->factor || 1 if $part->unit; + $qty = $unit->convert_to($qty, $part->unit_obj); } $params{chargenumber} ||= ''; @@ -626,6 +625,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); @@ -1020,6 +1022,8 @@ An expiration date. Note that this is not by default used by C =head1 BUGS +None yet. + =head1 AUTHOR =cut