+=item record_stocktaking
+
+A boolean flag to indicate that a stocktaking entry should be saved.
+
+=item stocktaking_qty
+
+The quantity for the stocktaking entry.
+
+=item stocktaking_cutoff_date
+
+The cutoff date for the stocktaking entry.
+
+=back
+
+=head2 create_assembly \%PARAMS, [ \%PARAMS, ... ]
+
+Creates an assembly if all defined items are available.
+
+Assembly item(s) will be stocked out and the assembly will be stocked in,
+taking into account the qty and units which can be defined for each
+assembly item separately.
+
+The calling params originate from C<transfer> but only parts_id with the
+attribute assembly are processed.
+
+The typical params would be:
+
+ my %TRANSFER = (
+ 'login' => $::myconfig{login},
+ 'dst_warehouse_id' => $form->{warehouse_id},
+ 'dst_bin_id' => $form->{bin_id},
+ 'chargenumber' => $form->{chargenumber},
+ 'bestbefore' => $form->{bestbefore},
+ 'assembly_id' => $form->{parts_id},
+ 'qty' => $form->{qty},
+ 'comment' => $form->{comment}
+ );
+
+
+=head2 get_wh_and_bin_for_charge C<$params{chargenumber}>
+
+Gets the current qty from the inventory entries with the mandatory chargenumber: C<$params{chargenumber}>.
+Croaks if the chargenumber is missing or no entry currently exists.
+If there is one bin and warehouse with a positive qty, this fields are returned:
+C<qty> C<warehouse_id>, C<bin_id>, C<chargenumber>.
+Otherwise returns undef.
+
+
+=head3 Prerequisites
+
+All of these prerequisites have to be trueish, otherwise the function will exit
+unsuccessfully with a return value of undef.
+
+=over 4
+
+=item Mandantory params
+
+ assembly_id, qty, login, dst_warehouse_id and dst_bin_id are mandatory.
+
+=item Subset named 'Assembly' of data set 'Part'
+
+ assembly_id has to be an id in the table parts with the valid subset assembly.
+
+=item Assembly is composed of assembly item(s)
+
+ There has to be at least one data set in the table assembly referenced to this assembly_id.
+
+=item Assembly can be disassembled
+
+ Assemblies are like cakes. You cannot disassemble it. NEVER.
+ But if your assembly is a mechanical cake you may unscrew it.
+ Assemblies are created in one transaction therefore you can
+ safely rely on the trans_id in inventory to disassemble the
+ created assemblies (see action disassemble_assembly in wh.pl).
+
+=item The assembly item(s) have to be in the same warehouse
+
+ inventory.warehouse_id equals dst_warehouse_id (client configurable).
+
+=item The assembly item(s) have to be in stock with the qty needed
+
+ I can only make a cake by receipt if I have ALL ingredients and
+ in the needed stock amount.
+ The qty of stocked in assembly item(s) has to fit into the
+ number of the qty of the assemblies, which are going to be created (client configurable).
+
+=item assembly item(s) with the parts set 'service' are ignored
+
+ The subset 'Services' of part will not transferred for assembly item(s).
+
+=back
+
+Client configurable prerequisites can be changed with different
+prerequisites as described in client_config (s.a. next chapter).
+
+
+=head2 default creation of assembly
+
+The valid state of the assembly item(s) used for the assembly process are
+'out' for the general direction and 'used' as the specific reason.
+The valid state of the assembly is 'in' for the direction and 'assembled'
+as the specific reason.
+
+The method is transaction safe, in case of errors not a single entry will be made
+in inventory.
+
+Two prerequisites can be changed with these global parameters
+
+=over 2
+
+=item $::instance_conf->get_transfer_default_warehouse_for_assembly
+
+ If trueish we try to get all the items form the default bins defined in parts
+ and do not try to find them in the destination warehouse. Returns an
+ error if not all items have set a default bin in parts.
+
+=item $::instance_conf->get_bin_id_ignore_onhand
+
+ If trueish we can create assemblies even if we do not have enough items in stock.
+ The needed qty will be booked in a special bin, which has to be configured in
+ the client config.
+