LOG0502 Create Simple Warehouse Orders (with separate lines for the components)
Basic Information
Module | Logistics.WMS |
---|---|
Code | LOG0502 |
Parent Document | Warehouse Requisition |
Sub-document | Warehouse Order |
Full Name | Create Simple Warehouse Orders (with separate lines for the components) |
Status | NEW |
Deterministic | YES |
Supports Transitional Documents | NO |
Supports Single Execution | YES |
Replaces | - |
Orphan Rows | Ignore |
Split Function | - |
Version | Introduced: 2023 Updated: - |
Date of Suspension | - |
Business Logic
This generation is used to create Warehouse Orders from Warehouse Requisitions when the company is using Composite Products. Thе generation creates warehouse orders for both composite and noncomposite products. What is special about this generation is that it creates two kinds of warehouse order lines for the composite products. One line for the composite product and one line for each of its components.
The Warehouse Order’s header is created based on the Warehouse Requisition’s header as follows:
WarehouseOrder.DocumentDate = WarehouseRequisition.DocumentDate
WarehouseOrder.Warehouse = WarehouseRequisition.Warehouse
WarehouseOrder.WarehouseWorker = NULL
Note
The attributes which are not specified here are filled in as described in Standard Document Attributes
Note
The new Warehouse Order is saved then and only when there is at least one line in it.
Fulfillments
Fulfilment Name | WarehouseRequisitionLineToWarehouseOrderLine |
---|---|
Fulfilment Tracking Type | Fulfilment Table |
Parent Entity | WarehouseRequisitionLine |
Fulfilment Table | DocumentFulfillment |
Parent Entity/ Fulfilment Table Relationship | WarehouseRequisitionLineId = DocumentFulfillment.DocumentLineId |
Metrics
Fulfilment Name | Metric Name | Measurement Unit | Parent Value | Fulfilment Table Value | New Record |
---|---|---|---|---|---|
WarehouseRequisitionLineToWarehouseOrderLine | MQuantityBase | WarehouseRequisitionLine.Product.BaseMeasurementUnit | WarehouseRequisitionLineLine.QuantityBase | DocumentFulfillment.QuantityBase | NO |
WarehouseRequisitionLineToWarehouseOrderLine | MStandardQuantity | WarehouseRequisitionLine.Product.BaseMeasurementUnit | WarehouseRequisitionLineLine.StandardQuantity | DocumentFulfillment.StandardQuantity | YES |
The Warehouse Order Lines creation
The lines of the new document are created based on the data of the Planned records in the Document Fulfillments table.
The table contains the information for the Fulfilled Part of quantities by the Warehouse Oders which have already been created.
Note
Note that for the calculation of the Fulfilled Part are taken into account only the recods whoose Fulfillment Type is Planned.
The creation starts with determining the kind of the product (composite or not) and the direction of movement.
Is the product a composite product?
A product is considered as composite when it has atleast one valid component.
Valid composite product components are those for which:
- FromDate == null OR <= WarehouseOrder.DocumentDate
- ToDate == null OR >= WarehouseOrder.DocumentDate
- IsActive == true
What is the direction on the movement?
It depends on the parent requisition's Requisition Type which can be "Inbound" or "Outbound".
Depending on the answers on both questions system may create three types of warehouse order lines:
- a line executing a non-composite product;
- a line executing a composite product;
- a line/s executing the composite product's components.
Non-composite products
If the parent requsition line's products is non-composite, the system will create a "traditional" warehouse order line with Receive or Dispatch task type.
Warehouse Order Lines for the non-composite product are created as follows
WarehouseOrderLine.TaskType = If (WarehouseRequisition.RequisitionType = Inbound )
, then WarehouseOrderLine.TaskType = Receive
, else WarehouseOrderLine.TaskType = Dispatch
WarehouseOrderLine.LineGroupNo = If all products in the order are non-composite, then 1, else autonumber 1, 2, 3
WarehouseOrderLine.Product = WarehouseRequisitionLine.Product
WarehouseOrderLine.Lot = WarehouseRequisitionLine.Lot
WarehouseOrderLine.SerialNumber = WarehouseRequisitionLine.SerialNumber
WarehouseOrderLine.ProductVariant = WarehouseRequisitionLine.ProductVariant
WarehouseOrderLine.QuantityUnit = WarehouseRequisitionLine.QuantityUnit
WarehouseOrderLine.Quantity = CONVERT(WarehouseOrderLine.StandardQuantity, WarehouseOrderLine.QuantityUnit)
WarehouseOrderLine.QuantityBase = WarehouseRequisitionLine.REMAINING(MQuantityBase)
WarehouseOrderLine.StandardQuantity = WarehouseRequisitionLine.REMAINING(MStandardQuantity)
WarehouseOrderLine.LogisticUnit = NULL
WarehouseOrderLine.WarehouseZone = NULL
WarehouseOrderLine.WarehouseLocation =NULL
WarehouseOrderLine.ToWarehouseLocation = NULL
WarehouseOrderLine.WarehouseWorker = NULL
WarehouseOrderLine.Notes = WarehouseRequisitionLine.Notes
WarehouseOrderLine.ParentDocument = WarehouseRequisition
WarehouseOrderLine.ParentLineNo = WarehouseRequisitionLine.LineNo
Composite products
If the parent requsition line contains a composite product, the system will create two sets of Warehouse Order Lines to fulfill it - one for the composite product and one for each of its components.
If the movement type is "Inbound", the created composite product line is with "Dekit" task type, because it respresents the "disassembly" of the product. On the other hand, the components lines have "Component Receive' task type because they are the ones need to be physically received in the warehouse and put away in the warehouse locations.
The order of the lines of the two sets depends on the value of the "Dekitting Controlling Level" policy. If the policy's value is 40 or 50, then the dekit line for composite product is created first and then then it is followed by the composite receive lines. If the policy's value is 10, 20 or 30, then the component receive lines are created first and then then they are followed by the dekit line for composite product itself.
This is the opposite of when the movement type is "Outbound", the created composite product line is with "Kit" task type, because it respresents the "assembly" of the product. On the other hand, the components lines have "Component Dispatch' task type because they are the ones that need to be physically dispatched from the warehouse.
The order of the lines is always the same, the component dispatch lines are created first and they are followed by the kit line for composite product itself.
The link between the two sets (the line of the composite product and the lines for its components) is performed through the "Line Group No" field in the warehouse order line. Component lines have the same "Line Group No" as the "Line Group No" of their composite product line e.g. "1".
The Warehouse Order Lines for composite products are created as follows
WarehouseOrderLine.TaskType = If (WarehouseRequisition.RequisitionType = Inbound )
, then WarehouseOrderLine.TaskType = Dekit
, else WarehouseOrderLine.TaskType = Kit
WarehouseOrderLine.LineGroupNo = an autonumber 1, 2, 3
WarehouseOrderLine.Product = WarehouseRequisitionLine.Product
WarehouseOrderLine.Lot = WarehouseRequisitionLine.Lot
WarehouseOrderLine.SerialNumber = WarehouseRequisitionLine.SerialNumber
WarehouseOrderLine.ProductVariant = WarehouseRequisitionLine.ProductVariant
WarehouseOrderLine.QuantityUnit = WarehouseRequisitionLine.QuantityUnit
WarehouseOrderLine.Quantity = CONVERT(WarehouseOrderLine.StandardQuantity, WarehouseOrderLine.QuantityUnit)
WarehouseOrderLine.QuantityBase = WarehouseRequisitionLine.REMAINING(MQuantityBase)
WarehouseOrderLine.StandardQuantity = WarehouseRequisitionLine.REMAINING(MStandardQuantity)
WarehouseOrderLine.LogisticUnit = NULL
WarehouseOrderLine.WarehouseZone = NULL
WarehouseOrderLine.WarehouseLocation =NULL
WarehouseOrderLine.ToWarehouseLocation = NULL
WarehouseOrderLine.WarehouseWorker = NULL
WarehouseOrderLine.Notes = WarehouseRequisitionLine.Notes
WarehouseOrderLine.ParentDocument = WarehouseRequisition
WarehouseOrderLine.ParentLineNo = WarehouseRequisitionLine.LineNo
The Warehouse Order Lines for the the composite product's components are created as follows
First we are getting all valid Composite Product's Components. Valid composite product components are those for which:
- FromDate == null OR <= WarehouseOrder.DocumentDate;
- ToDate == null OR >= WarehouseOrder.DocumentDate;
- IsActive == true.
Тhen we are creating new Warehouse Order Line for each of them:
WarehouseOrderLine.TaskType = If (WarehouseRequisition.RequisitionType = Inbound )
, then WarehouseOrderLine.TaskType = ComponentReceive
, else WarehouseOrderLine.TaskType = ComponentDispatch
WarehouseOrderLine.LineGroupNo = same as the LineGroupNo of the kit/dekit line of the composite product
WarehouseOrderLine.Product = CompositeProductComponent.ComponentProductId
WarehouseOrderLine.Lot = NULL
WarehouseOrderLine.SerialNumber = NULL
WarehouseOrderLine.ProductVariant = NULL
WarehouseOrderLine.QuantityUnit = FIRST(MeasurementUnits where SystemUnit = Pieces)
WarehouseOrderLine.Quantity = the StandardQuantity of the WarehouseOrderLine created for the composite product * Component.Quantity
WarehouseOrderLine.QuantityBase = the StandardQuantity of the WarehouseOrderLine created for the composite product * Component.Quantity
WarehouseOrderLine.StandardQuantity = the StandardQuantity of the WarehouseOrderLine created for the composite product * Component.Quantity
WarehouseOrderLine.LogisticUnit = NULL
WarehouseOrderLine.WarehouseZone = NULL
WarehouseOrderLine.WarehouseLocation = NULL
WarehouseOrderLine.ToWarehouseLocation = NULL
WarehouseOrderLine.WarehouseWorker = NULL
WarehouseOrderLine.Notes = WarehouseRequisitionLine.Notes
WarehouseOrderLine.ParentDocument = WarehouseRequisition
WarehouseOrderLine.ParentLineNo = WarehouseRequisitionLine.LineNo
Once all of the Warehouse Order Lines are created and before the document is saved, the generation generates records in the Document Fulfillment table. These records reflect the quantities fulfilled by the current iteration of the generation procedure and are needed to determine the quantities for subsequent generation iterations.
The new Document Fulfillment is created as follows:
Important: Note that document fulfillments are NOT created for the warehouse order lines with the product's components.
DocumentFulfillment.Document = WarehouseRequisition
DocumentFulfillment.DocumentLineId = WarehouseRequisitionLineId
DocumentFulfillment.LineNo = WarehouseRequisitionLine.LineNo
DocumentFulfillment.FulfillmentType = Planned
DocumentFulfillment.IsFinal = If (WarehouseOrder.DocumentType.GenerateSingleDocument = true)
, then DocumentFulfillment.IsFinal = true
, else DocumentFulfillment.IsFinal = false
DocumentFulfillment.LineType = Line
DocumentFulfillment.QuantityBase = WarehouseOrderLine.QuantityBase
DocumentFulfillment.StandardQuantity = WarehouseOrderLine.StandardQuantity
DocumentFulfillment.Product = WarehouseOrderLine.Product
DocumentFulfillment.Lot = WarehouseOrderLine.Lot
DocumentFulfillment.SerialNumber = WarehouseOrderLine.SerialNumber
DocumentFulfillment.ProductVariant = WarehouseOrderLine.ProductVariant
DocumentFulfillment.DestinationEntityName = Wms_Warehouse_Order_Lines