From: Sven Schöling Date: Wed, 20 Nov 2019 13:22:45 +0000 (+0100) Subject: Inventory: warnings X-Git-Tag: kivitendo-mebil_0.1-0~9^2~606 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=acf478a3b434c5c8e593220c35e36005d4afe219;p=kivitendo-erp.git Inventory: warnings --- diff --git a/SL/Helper/Inventory.pm b/SL/Helper/Inventory.pm index 14d4d1619..166106c4e 100644 --- a/SL/Helper/Inventory.pm +++ b/SL/Helper/Inventory.pm @@ -168,9 +168,9 @@ sub allocate { return () if $qty <= 0; my $results = get_stock(part => $part, by => 'for_allocate'); - my %bin_whitelist = map { (ref $_ ? $_->id : $_) => 1 } listify($params{bin}); - my %wh_whitelist = map { (ref $_ ? $_->id : $_) => 1 } listify($params{warehouse}); - my %chargenumbers = map { (ref $_ ? $_->id : $_) => 1 } listify($params{chargenumber}); + my %bin_whitelist = map { (ref $_ ? $_->id : $_) => 1 } grep defined, listify($params{bin}); + my %wh_whitelist = map { (ref $_ ? $_->id : $_) => 1 } grep defined, listify($params{warehouse}); + my %chargenumbers = map { (ref $_ ? $_->id : $_) => 1 } grep defined, listify($params{chargenumber}); my %reserve_whitelist; if ($params{reserve_for}) { $reserve_whitelist{ $_->meta->table }{ $_->id } = 1 for listify($params{reserve_for});