ProcurementProgramLine GitHub

πŸ“Š 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

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