LOG0212 Create receipt Store order for the products remaining to be issued (for planning only)
Basic Information
Module | Logistics.Inventory |
---|---|
Code | LOG0212 |
Parent Document | Transfer Order |
Sub-document | Store Order |
Full Name | Create receipt Store order for the products remaining to be issued (for planning only) |
Status | ACTIVE |
Deterministic | NO |
Supports Transitional Documents | NO |
Supports Single Execution | YES |
Replaces | GenerateSeparateReceiptStoreOrders |
Orphan Rows | Forbid |
Split Function | |
Introduced In Version | 2024 |
Date of Suspension | - |
Business Logic
This Generation procedure is used to create receipt Store Orders (SO) from Transfer Orders (TO).
This procedure is unique in that it creates receipt SOs only for products/lines planned to be issued, meaning there are no released and non-voided Store Transactions (ST) for these lines yet. These SOs are solely for planning purposes and are NOT intended to be processed or released by users or any other processes. They are generated in the Planning state and are automatically voided by the system once the products are issued from the other store.
This generation procedure is typically configured in combination with a second procedure, LOG0211, which creates SOs for products that have already been issued. While LOG0211 provides details about what has already been issued and is currently expected, LOG0212 indicates what remains to be issued and is planned to be received in the future.
Note
IMPORTANT: Note that document routes for both generation procedures must be set up to create different Document Types otherwise, they won’t function correctly.
The new SO's header is created as follows:
StoreOrder.DocumentDate = TransferOrder.DocumentDate
StoreOrder.PlanningOnly = True
StoreOrder.Store = TransferOrder.ToStore
StoreOrder.EnterpriseCompanyLocation =
if (TransferOrder.ToStore.EnterpriseCompanyLocation != null)
, then TransferOrder.ToStore.EnterpriseCompanyLocation
, else TransferOrder.EnterpriseCompanyLocation
StoreOrder.MovementType = Receipt
StoreOrder.DueDate = TransferOrder.DefaultDueDateIn
StoreOrder.PlannedReleaseDate = TransferOrder.DefaultDueDateIn
StoreOrder.PlannedCompletionDate = TransferOrder.DefaultDueDateIn
StoreOrder.CurrencyDirectory = TransferOrder.CurrencyDirectory
StoreOrder.DocumentCurrency =
if (TransferOrder.ToStore.Currency != null)
, then TransferOrder.ToStore.Currency
, else Error "The field 'Document Currency' in the Store Order cannot be filled because currency for the receipt store is not specified."
StoreOrder.FromParty = TransferOrder.FromParty
StoreOrder.ToParty = TransferOrder.FromStore
Fulfillments
Name | TransferOrderLineToIssueStoreTransactionLine |
---|---|
Parent Entity | TransferOrderLine |
Child Entity | StoreTransactionLines (where "StoreTransactionLine.StoreTransaction.MovementType = Issue" AND "StoreTransactionLine.Document.State = RELEASE" AND "StoreTransactionLine.Document.Void = False") |
Parent / Child Relationship | StoreTransactionLine.ParentStoreOrderLine.ParentLineId = TransferOrderLine.Id |
Metrics
Fulfillment Name | Metric Name | Measurement Unit | Parent Value | Child Value | New Record |
---|---|---|---|---|---|
TransferOrderLineToIssueStoreTransactionLine | MStandardQuantityBase | TransferOrderLine.Product.BaseMeasurementUnit | TransferOrderLine.StandardQuantityBase | StoreTransactionLine.StandardQuantityBase | if there is atleast one Child.StoreTransactionLine where Finished = TRUE , then 'New Record = NO' ,else 'New Record = YES' |
TransferOrderLineToIssueStoreTransactionLine | MQuantity | TransferOrderLine.QuantityUnit | TransferOrderLine.Quantity | StoreTransactionLine.Quantity | NO |
TransferOrderLineToIssueStoreTransactionLine | MQuantityBase | TransferOrderLine.Product.BaseMeasurementUnit | TransferOrderLine.QuantityBase | StoreTransactionLine.QuantityBase | NO |
The lines of the new SO are created as follows:
StoreOrderLine.LineNo = autonumber 10, 20, 30
StoreOrderLine.Product = TranferOrderLine.Product
StoreOrderLine.ProductVariant = TranferOrderLine.ProductVariant
StoreOrderLine.StoreBin = TranferOrderLine.ToStoreBin
StoreOrderLine.SerialNumber = TranferOrderLine.SerialNumber
StoreOrderLine.Quantity = TranferOrderLine.REMAINING(MQuantity)
StoreOrderLine.QuantityUnit = TranferOrderLine.QuantityUnit
StoreOrderLine.QuantityBase = TranferOrderLine.REMAINING(MQuantityBase)
StoreOrderLine.StandardQuantityBase = TranferOrderLine.REMAINING(MStandardQuantityBase)
StoreOrderLine.LineCost = 0
StoreOrderLine.UnitCost = 0
StoreOrderLine.Lot = TranferOrderLine.Lot
StoreOrderLine.GuaranteePeriodDays = Product.GuaranteePeriodDays
StoreOrderLine.SalesOrderLine = null
StoreOrderLine.Notes = TranferOrderLine.Notes
StoreOrderLine.PersistLot = false
StoreOrderLine.ParentDocument = TranferOrder
StoreOrderLine.ParentLineNo = TranferOrderLine.LineOrd
StoreOrderLine.ParentLineId = TranferOrderLine.Id
StoreOrderLine.TransactionTimestamp = null
StoreOrderLine.ForOrdering = false
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.