LOG0501 Create Simple Warehouse Orders

Basic Information

Module Logistics.WMS
Code LOG0501
Parent Document Warehouse Requisition
Sub-document Warehouse Order
Full Name Create Simple Warehouse Orders
Status NEW
Deterministic YES
Supports Transitional Documents NO
Supports Single Execution YES
Replaces -
Orphan Rows Ignore
Split Function -
Version Introduced: 2022 Updated: -
Date of Suspension -

Business Logic

This generation is used to create Warehouse Orders from Warehouse Requisitions. Thе generation is called simple because it uses a simplified method in creating tasks. It creates a single task for each warehouse requisition line instead of relying on the complex logic of the zone-based routing.

It is suitable for use when starting work with the module or if it is not necessary to use complex logic in determining the warehouse locations.

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 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 new Warehouse Order Line is created as follows:

WarehouseOrderLine.TaskType = If (WarehouseRequisition.RequisitionType = Inbound )

                            , then WarehouseOrderLine.TaskType = Receive

                            , else WarehouseOrderLine.TaskType = Dispatch

WarehouseOrderLine.Product = WarehouseRequisitionLine.Product

WarehouseOrderLine.Lot = WarehouseRequisitionLine.Lot

WarehouseOrderLine.SerialNumber = WarehouseRequisitionLine.SerialNumber

WarehouseOrderLine.ProductVariant = WarehouseRequisitionLine.ProductVariant

WarehouseOrderLine.QuantityUnit = WarehouseRequisitionLine.QuantityUnit

WarehouseOrderLine.Quantity =  If there are no records in the Document Fulfillment table for the current WarehouseRequisitionLine
                               , then WarehouseOrderLine.Quantity = WarehouseRequisitionLine.Quantity
                               , else 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

Once all 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:

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