Table of Contents

LOG0210 Create issue store order with break down by lots

Basic Information

Module Logistics.Inventory
Code LOG0210
Parent Document Transfer Order
Sub-document Store Order
Full Name Create issue store order with break down by lots
Status NEW
Deterministic NO
Supports Transitional Documents NO
Supports Single Execution YES
Replaces CreateIssueStoreOrderWithBreakDownByLots
Orphan Rows Forbid
Split Function
Introduced In Version 2024
Date of Suspension -

Business Logic

This Generation is used to create Store Orders from the Transfer Order and break down rows by Available To Promise Lots.

StoreOrder.DocumentDate = TransferOrder.DocumentDate

StoreOrder.Store = TransferOrder.FromStore

StoreOrder.MovementType = Issue

StoreOrder.DueDate = TransferOrder.DefautDueDateOut

StoreOrder.PlannedReleaseDate = TransferOrder.DefautDueDateOut

StoreOrder.PlannedCompletionDate = TransferOrder.DefautDueDateOut

StoreOrder.IssuedByParty = null

StoreOrder.DocumentCurrency =  

​                          if (TransferOrder.FromStore.Currency != null)

​                          , then TransferOrder.FromStore.Currency

​                          , else Error "The field 'Document Currency' in the Store Order cannot be filled because currency for the issued store is not specified."

StoreOrder.FromParty = TransferOrder.FromParty

StoreOrder.ToParty = TransferOrder.ToStore

Fulfillments

Name TransferOrderLineToStoreOrderLine
Parent Entity TransferOrderLines
Child Entity StoreOrderLines (where "StoreOrderLine.StoreOrder.MovementType = Issue"
Parent / Child Relationship StoreOrderLine.ParentDocument = TransferOrder; StoreOrderLine.ParentLineNo = TransferOrderLine.LineOrd

Metrics

Fulfillment Name Metric Name Measurement Unit Parent Value Child Value New Record
TransferOrderLineToStoreOrderLine MStandardQuantityBase TransferOrderLine.Product.BaseMeasurementUnit TransferOrderLine.StandardQuantityBase StoreOrderLine.StandardQuantityBase YES
TransferOrderLineToStoreOrderLine MQuantity TransferOrderLine.QuantityUnit TransferOrderLine.Quantity StoreOrderLine.Quantity NO
TransferOrderLineToStoreOrderLine MQuantityBase TransferOrderLine.Product.BaseMeasurementUnit TransferOrderLine.QuantityBase StoreOrderLine.QuantityBase NO



Store Order Lines are created from Transfer Order Lines by allocating the ordered quantities across available lots, using the Lots Issue algorithm. This algorithm selects lots based on the Available to Promise (ATP) logic and the defined lot issuing strategy (e.g., FIFO, FEFO, LIFO).

If the full quantity cannot be fulfilled from a single lot, the line is split into multiple Store Order Lines, each referencing a different lot with available quantity.
If there is insufficient total lot quantity to cover the required amount, the remaining quantity is added in a separate line with Lot = null, indicating that the allocation could not be completed with existing lots.

The new Store Order Line is created as follows:

StoreOrderLine.LineNo = TransferOrderLine.LineOrd

StoreOrderLine.ParentLineId = TranferOrderLine.Id

StoreOrderLine.Product = TransferOrderLine.Product

StoreOrderLine.ProductVariant = TransferOrderLine.ProductVariant

StoreOrderLine.StoreBin = TransferOrderLine.FromStoreBin

StoreOrderLine.SerialNumber = TransferOrderLine.SerialNumber

StoreOrderLine.QuantityBase =
                          if CurrentLot.ATP >= (TransferOrderLine.REMAINING(MQuantityBase) - the sum of QuantityBase of the previous Lot lines in this document)

                          , then StoreOrderLine.QuantityBase = TransferOrderLine.REMAINING(MQuantityBase) - the sum of QuantityBase of the previous Lot lines in this document

                          else StoreOrderLine.QuantityBase = CurrentLot.ATP

StoreOrderLine.StandardQuantityBase = StoreOrderLine.QuantityBase

StoreOrderLine.QuantityUnit = TransferOrderLine.QuantityUnit

StoreOrderLine.Quantity = If this is not the last line in the breakdown

                          , then StoreOrderLine.Quantity = StoreOrderLine.QuantityBase.ConvertTo(StoreOrderLine.QuantityUnit, StoreOrderLine.Product)

                          еlse StoreOrderLine.Quantity = TransferOrderLine.REMAINING(MQuantity) − sum of StoreOrderLine.Quantity of the previous lines in this breakdown

StoreOrderLine.UnitCost = null

StoreOrderLine.LineCost = null

StoreOrderLine.Lot =

​                 if (TransferOrderLine.Lot != Null), then StoreOrderLine.Lot = TransferOrderLine.Lot

                 else if (Lots Issue* == Null), then StoreOrderLine.Lot = Null

                 else Lots Issue*

StoreOrderLine.GuaranteePeriodDays = TransferOrderLine.Product.GuaranteePeriodDays

StoreOrderLine.SalesOrderLine = null

StoreOrderLine.Notes = TransferOrderLine.Notes

StoreOrderLine.PersistLot = false

StoreOrderLine.ParentDocument = TransferOrder

StoreOrderLine.ParentLineNo = TransferOrderLine.LineOrd

StoreOrderLine.TransactionTimestamp = null

StoreOrderLine.ForOrdering = false

Lots Issue is algorithm than determine Lots from Available To Promise Lots.

Note

WARNING: Any of the Store Orders created according to the description above is saved then and only when there is at least one line in it.