ProcurementProgramLine
| π Overview: 18 Properties | 1 Constructor | 14 Functions | 13 Getters |
π Description
Sets default action flags based on line type (forecast, backlog, new order, existing order, etc.)
π Last updated: 2025-12-10T11:45:23.864Z
π Table of Contents
- π Properties (18)
- ποΈ Constructor (2 params)
- βοΈ Functions
- Regular Functions
- setDefaultActions
- newFromText (1 param)
- newFromCustomerOrder (1 param)
- getWarehouseWithCustomerCode β
Text - setAction
- _setActions (1 param)
- _copyItemNumber
- _setActionIgnore (1 param)
- process
- _setNewCustomer_OrderEntity β
$Customer_OrderEntity : cs.Customer_OrderEntity - process_CreateForecast
- process_CreateOrder
- process_UpdateOrder
- process_CloseOrder
- Computed Attributes (Getters/Setters/Query/OrderBy)
- ActionText->$ActionText π β
Text - IsActionSet π β
Boolean - IsBacklog π β
Boolean - IsExistingOrder π β
Boolean - IsExistingOrderModified π β
Boolean - IsForecast π β
Boolean - IsItemMissing π β
Boolean - IsNewOrder π β
Boolean - Meta->$Meta π β
cs.UI.ListBoxMeta - OrderBatchNumber π β
Text - OurPartName π β
Text - StatusText->$StatusText π β
Text - WeekNumberText π β
Text
- ActionText->$ActionText π β
- Regular Functions
Properties
| Property | Type | Default | Description |
|---|---|---|---|
ItemNumber | Text | - | Customerβs item reference number |
OrderNumber | Text | - | Order number or status (FORECAST, BACKLOG, BACKORDER, or actual order number) |
Quantity | Integer | - | Quantity ordered or forecasted |
DueDate | Date | - | Customer delivery date |
ItemDescription | Text | - | Description of the item from procurement program |
Vmi | Boolean | - | True if this is a Vendor Managed Inventory item |
Warehouse | Text | - | Warehouse location code (e.g., NTN, SNR) |
Product_OptionEntity | cs.Product_OptionEntity | - | Linked product option (matched by CustomerReference), can be Null if not found |
Customer_OrderEntity | cs.Customer_OrderEntity | - | Existing customer order entity if line matches an existing order, otherwise Null |
ProcurementProgram | cs.ProcurementProgram | - | Parent procurement program object |
RemovedFromProgram | Boolean | - | True if this order exists in system but was not in latest procurement program file |
Action_CreateForecast | Boolean | - | True if action is to create a forecast order |
Action_CreateOrder | Boolean | - | True if action is to create a new customer order |
Action_Ignore | Boolean | - | True if no action should be taken (e.g., backlog items) |
Action_CloseOrder | Boolean | - | True if existing order should be closed |
Action_UpdateOrder | Boolean | - | True if existing order quantity should be updated |
WarehouseWithCustomerCode | Text | - | Warehouse code with customer code appended in format βNTN (123)β |
ds | Not specified | DataStore(0) | Reference to main datastore |
Constructor
constructor
[ποΈ constructor]
Class constructor($TextLineOrCustomer_OrderEntity : Variant; $ProcurementProgram : cs.ProcurementProgram)
Creates a procurement program line from either tab-delimited text or an existing Customer_OrderEntity
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$TextLineOrCustomer_OrderEntity | Variant | - | - |
$ProcurementProgram | cs.ProcurementProgram | - | - |
Functions
Regular Functions
setDefaultActions
Function setDefaultActions
Sets default action flags based on line type (forecast, backlog, new order, existing order, etc.)
newFromText
Function newFromText($Line : Text)
Parses tab-delimited text line and populates properties, attempts to match product and existing order
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$Line | Text | - | - |
newFromCustomerOrder
Function newFromCustomerOrder($Customer_OrderEntity : cs.Customer_OrderEntity)
Populates properties from an existing Customer_OrderEntity (used for orders removed from program)
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$Customer_OrderEntity | cs.Customer_OrderEntity | - | - |
getWarehouseWithCustomerCode
Function getWarehouseWithCustomerCode -> Text
Returns warehouse code with customer code appended in format βNTN (123)β, or just warehouse code if customer not found
Returns: Text
setAction
Function setAction
_setActions
Function _setActions($ActiveActionProperty : Text)
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$ActiveActionProperty | Text | - | - |
_copyItemNumber
Function _copyItemNumber
_setActionIgnore
Function _setActionIgnore($IgnoreForAllOrders : Boolean)
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$IgnoreForAllOrders | Boolean | - | - |
process
Function process
_setNewCustomer_OrderEntity
Function _setNewCustomer_OrderEntity -> $Customer_OrderEntity : cs.Customer_OrderEntity
Returns: cs.Customer_OrderEntity
process_CreateForecast
Function process_CreateForecast
process_CreateOrder
Function process_CreateOrder
process_UpdateOrder
Function process_UpdateOrder
process_CloseOrder
Function process_CloseOrder
Computed Attributes (Getters/Setters/Query/OrderBy)
ActionText->$ActionText {#actiontext->$actiontext}
[π get only]
Function get ActionText->$ActionText -> Text
Returns: Text
IsActionSet
[π get only]
Function get IsActionSet -> Boolean
Returns true if any action flag is set for this line
Returns: Boolean
IsBacklog
[π get only]
Function get IsBacklog -> Boolean
Returns true if order status is BACKLOG or BACKORDER
Returns: Boolean
IsExistingOrder
[π get only]
Function get IsExistingOrder -> Boolean
Returns true if both product and matching customer order exist
Returns: Boolean
IsExistingOrderModified
[π get only]
Function get IsExistingOrderModified -> Boolean
Returns true if existing order quantity differs from procurement program quantity
Returns: Boolean
IsForecast
[π get only]
Function get IsForecast -> Boolean
Returns true if order status is FORECAST
Returns: Boolean
IsItemMissing
[π get only]
Function get IsItemMissing -> Boolean
Returns true if item number could not be matched to a Product_Option in the system
Returns: Boolean
IsNewOrder
[π get only]
Function get IsNewOrder -> Boolean
Returns true if product exists but no matching customer order found
Returns: Boolean
Meta->$Meta {#meta->$meta}
[π get only]
Function get Meta->$Meta -> cs.UI.ListBoxMeta
Returns: cs.UI.ListBoxMeta
OrderBatchNumber
[π get only]
Function get OrderBatchNumber -> Text
Returns batch number in format βYYYY-MM-DDβ for grouping orders
Returns: Text
OurPartName
[π get only]
Function get OurPartName -> Text
Returns: Text
StatusText->$StatusText {#statustext->$statustext}
[π get only]
Function get StatusText->$StatusText -> Text
Returns: Text
WeekNumberText
[π get only]
Function get WeekNumberText -> Text
Returns week number in format βYYYY-WWβ
Returns: Text
Generated from ProcurementProgramLine.4dm