From 2436f6e94ca447e5c6f5c3002e5cd6767d025173 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 7 Jun 2021 13:31:44 +0200 Subject: [PATCH] S/H/Inventory Kosmetik. Kritische Parameter am Anfang der Routine abfragen --- SL/Helper/Inventory.pm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/SL/Helper/Inventory.pm b/SL/Helper/Inventory.pm index 147bc7d76..cc7601f6d 100644 --- a/SL/Helper/Inventory.pm +++ b/SL/Helper/Inventory.pm @@ -285,6 +285,7 @@ sub produce_assembly { my $part = $params{part} or Carp::croak('produce_assembly needs a part'); my $qty = $params{qty} or Carp::croak('produce_assembly needs a qty'); + my $bin = $params{bin} or Carp::croak("need target bin"); my $allocations = $params{allocations}; if ($params{auto_allocate}) { @@ -295,18 +296,15 @@ sub produce_assembly { $allocations = $params{allocations}; } - my $bin = $params{bin} or Carp::croak("need target bin"); - my $chargenumber = $params{chargenumber}; - my $bestbefore = $params{bestbefore}; + my $chargenumber = $params{chargenumber}; + my $bestbefore = $params{bestbefore}; my $for_object_id = $params{for_object_id}; - my $comment = $params{comment} // ''; + my $comment = $params{comment} // ''; + my $invoice = $params{invoice}; + my $project = $params{project}; + my $shippingdate = $params{shippingsdate} // DateTime->now_local; + my $trans_id = $params{trans_id}; - my $invoice = $params{invoice}; - my $project = $params{project}; - - my $shippingdate = $params{shippingsdate} // DateTime->now_local; - - my $trans_id = $params{trans_id}; ($trans_id) = selectrow_query($::form, SL::DB->client->dbh, qq|SELECT nextval('id')| ) unless $trans_id; my $trans_type_out = SL::DB::Manager::TransferType->find_by(direction => 'out', description => 'used'); -- 2.20.1