X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/115e5a24fdbd1afcabfea1e308aae00b6cd55106..e9d624e651c136d55b4f35e3f5646ac3f5318e40:/SL/WH.pm diff --git a/SL/WH.pm b/SL/WH.pm index 3c3f65420..48d56e885 100644 --- a/SL/WH.pm +++ b/SL/WH.pm @@ -99,15 +99,21 @@ sub transfer { $direction |= 1 if $src_bin; $direction |= 2 if $dst_bin; - my $transfer_type = $objectify->($transfer, 'transfer_type', 'SL::DB::TransferType', direction => $directions[$direction], - description => $transfer->{transfer_type}); + my $transfer_type_id; + if ($transfer->{transfer_type_id}) { + $transfer_type_id = $transfer->{transfer_type_id}; + } else { + my $transfer_type = $objectify->($transfer, 'transfer_type', 'SL::DB::TransferType', direction => $directions[$direction], + description => $transfer->{transfer_type}); + $transfer_type_id = $transfer_type->id; + } my $stocktaking_qty = $transfer->{stocktaking_qty}; my %params = ( part => $part, employee => $employee, - trans_type => $transfer_type, + trans_type_id => $transfer_type_id, project => $project, trans_id => $trans_id, shippingdate => !$transfer->{shippingdate} || $transfer->{shippingdate} eq 'current_date'