WorksOrderEntity GitHub

πŸ“Š Overview: 7 Functions 6 Getters

Extends: Entity

πŸ• Last updated: 2026-01-13T16:04:13.805Z


πŸ“‘ Table of Contents


Functions

Regular Functions

setQuantityMade

[πŸ–₯️ local]

Function setQuantityMade($NewQuantity : Integer; $AdjustmentDate : Date) -> Date

Sets the quantity made for this works order by creating real-time records and calculating scrap

Parameters:

Name Type Optional Description
$NewQuantity Integer - -
$AdjustmentDate Date - -

Returns: Date


getQuantityMade

[πŸ–₯️ local]

Function getQuantityMade($UseRealTimeData : Boolean) -> Integer

Returns the quantity manufactured, optionally using real-time data or RTSUM data

Parameters:

Name Type Optional Description
$UseRealTimeData Boolean - -

Returns: Integer


getQuantityPacked

[πŸ–₯️ local]

Function getQuantityPacked($InStockOnly : Boolean) -> Integer

Returns the quantity packed, optionally filtered to stock items only

Parameters:

Name Type Optional Description
$InStockOnly Boolean - -

Returns: Integer


getQuantityScrapped

[πŸ–₯️ local]

Function getQuantityScrapped -> Integer

Returns the total quantity scrapped from both scrap records and real-time stoppage records

Returns: Integer


calculateProcessScrap

[πŸ–₯️ local]

Function calculateProcessScrap($MachineCompleted : Boolean; $PackingCompleted : Boolean)

Calculates and records process scrap based on robot status and order completion status

Parameters:

Name Type Optional Description
$MachineCompleted Boolean - -
$PackingCompleted Boolean - -

getMigrationRules

[πŸ–₯️ local]

Function getMigrationRules($RemoteEntity : cs.WorksOrderEntity) -> $Collection : Collection

Returns migration rules for syncing works order data during data migration

Parameters:

Name Type Optional Description
$RemoteEntity cs.WorksOrderEntity - -

Returns: Collection


syncMigrationSelections

[πŸ–₯️ local]

Function syncMigrationSelections($RemoteEntity : cs.WorksOrderEntity)

Syncs related entity selections during data migration (currently commented out)

Parameters:

Name Type Optional Description
$RemoteEntity cs.WorksOrderEntity - -

Computed Attributes (Getters/Setters/Query/OrderBy)

AvailableStock

[πŸ” get only, πŸ–₯️ local]

Function get AvailableStock -> Integer

Returns the total available finished stock in the default packing location for this works order

Returns: Integer


ExS1Stock

[πŸ” get only, πŸ–₯️ local]

Function get ExS1Stock -> Integer

Returns the quantity of stock for this works order in the ExS1 storage location

Returns: Integer


HasMigrationID

[πŸ” get, πŸ”Ž query, πŸ–₯️ local]

Function get HasMigrationID -> Boolean
Function query HasMigrationID($QueryEventObject : Object)

Returns true if this entity has a valid migration ID from data migration

Query Function: Enables querying this property in ORDA query strings (e.g., .query(":1"; $Value) where :1 is the property name).

Query Parameter:

Name Type Description
$QueryEventObject Object -

Returns: Boolean


IsOpen

[πŸ” get, πŸ”Ž query, πŸ–₯️ local]

Function get IsOpen -> Boolean
Function query IsOpen($QueryEventObject : Object)

Returns true if machine has started and packing has not been completed

Query Function: Enables querying this property in ORDA query strings (e.g., .query(":1"; $Value) where :1 is the property name).

Query Parameter:

Name Type Description
$QueryEventObject Object -

Returns: Boolean


IsRunning

[πŸ” get, πŸ”Ž query, πŸ–₯️ local]

Function get IsRunning -> Boolean
Function query IsRunning($QueryEventObject : Object)

Returns true if the machine has started and production has not been completed

Query Function: Enables querying this property in ORDA query strings (e.g., .query(":1"; $Value) where :1 is the property name).

Query Parameter:

Name Type Description
$QueryEventObject Object -

Returns: Boolean


WIP

[πŸ” get only, πŸ–₯️ local]

Function get WIP -> Integer

Returns work in progress quantity (made minus packed minus scrapped) if order is open

Returns: Integer


πŸ—‚οΈ Tables

  • WorksOrder - ORDA Entity class for WorksOrder table
  • WorksOrder - ORDA DataClass class for WorksOrder table

οΏ½ Forms


Generated from WorksOrderEntity.4dm


This site uses Just the Docs, a documentation theme for Jekyll.