GetStartQtyOfItemInWO Method
- Last UpdatedNov 06, 2025
- 2 minute read
The GetStartQtyOfItemInWO() method retrieves the start quantity for a work order. The quantity can optionally be filtered by an item and/or an operation.
public static void GetStartQtyOfItemInWO(
string woId,
string itemId,
string operId,
out double startQty
)
Parameters
- woId
- Required. Holds the ID of the work order.
- itemId
- Optional. Holds the ID of an item by which to filter the items included in the start quantity.
- operId
- Optional. Holds the ID of an operation by which to filter the items included in the start quantity.
- startQty
- Output. Holds the returned start quantity.
Return Value
Returns a DataSet that contains the start quantity for the work order.
The column of the returned DataSet is described below.
|
Column Name |
Description |
|---|---|
|
StartQty |
A double that is the start quantity. |
This method calculates the total expected quantity to produce of the supplied item ID of the supplied work order and operation. It retrieves the expected final quantity to be produced on this work order. If the supplied item ID is the same as the final item ID of the supplied work order, then the method returns the quantity of that item. If the supplied item ID is not equal to the final item in the work order, then the method first calculates the sum of the quantities (parentQty) to start for all the parent items whose job position is greater than 0 from Job_Bom table. Then it retrieves the parent item whose job position is 0. Finally, the method retrieves the qt_at_start for parent Items for this work order and operation (qty_per_parent). The total start quantity will equal the product of parentQty and qty_per_parent.