From: Jan Büren Date: Mon, 7 Jun 2021 11:31:44 +0000 (+0200) Subject: S/H/Inventory Kosmetik. Kritische Parameter am Anfang der Routine abfragen X-Git-Tag: kivitendo-mebil_0.1-0~9^2~181 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2436f6e94ca447e5c6f5c3002e5cd6767d025173;p=kivitendo-erp.git S/H/Inventory Kosmetik. Kritische Parameter am Anfang der Routine abfragen --- 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');