From acf478a3b434c5c8e593220c35e36005d4afe219 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 20 Nov 2019 14:22:45 +0100 Subject: [PATCH] Inventory: warnings --- SL/Helper/Inventory.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}); -- 2.20.1