Stock
| 📊 Overview: 1 Constructor | 17 Functions |
🕐 Last updated: 2025-12-10T11:45:24.385Z
📑 Table of Contents
- 🏗️ Constructor (2 params)
- ⚙️ Functions
- Regular Functions
- adjust (5 params) →
$lockObject : Object - move (5 params) →
$lockObject : Object - SetNewStockQuarantineStatus (1 param) →
$lockObject : Object - Quarantine_Stock (2 params) →
$lockObject : Object - Quarantine_Release (2 params) →
$lockObject : Object - Quarantine_Scrap (2 params) →
$lockObject : Object - startTransaction
- validateTransaction
- cancelTransaction
- InTransaction →
$InTransaction : Boolean - _RecordStockMovement (7 params) →
$Stock_MovementEntity : cs.Stock_MovementEntity - SetQuarantineReason (1 param) →
$lockObject : Object - GetAvailableQuantity (1 param) →
$AvailableQuantity : Integer - GetQuarantinedQuantity →
$QuarantinedQuantity : Integer - GetStockEntitySelection →
$EntitySelection : 4D.EntitySelection - GetNewStockQuarantineStatus →
$QuarantineNewStock : Boolean - GetQuarantineReason →
$QuarantineReason : Text
- adjust (5 params) →
- Regular Functions
Constructor
constructor
[🏗️ constructor]
Class constructor($DataStore : 4D.DataStoreImplementation; $WorksOrder : Integer)
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$DataStore | 4D.DataStoreImplementation | - | - |
$WorksOrder | Integer | - | - |
Functions
Regular Functions
adjust
Function adjust($LocationID : Integer; $AdjustmentQuantity : Integer; $CreateStockMovement : Boolean; $AdjustmentReason : Text; $AdviceNote : Integer) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$LocationID | Integer | - | - |
$AdjustmentQuantity | Integer | - | - |
$CreateStockMovement | Boolean | - | - |
$AdjustmentReason | Text | - | - |
$AdviceNote | Integer | - | - |
Returns: Object
move
Function move($FromLocation : Integer; $ToLocation : Integer; $AdjustmentQuantity : Integer; $AdjustmentReason : Text; $AdviceNote : Integer) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$FromLocation | Integer | - | - |
$ToLocation | Integer | - | - |
$AdjustmentQuantity | Integer | - | - |
$AdjustmentReason | Text | - | - |
$AdviceNote | Integer | - | - |
Returns: Object
SetNewStockQuarantineStatus
Function SetNewStockQuarantineStatus($QuarantineNewStock : Boolean) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$QuarantineNewStock | Boolean | - | - |
Returns: Object
Quarantine_Stock
Function Quarantine_Stock($QuantityToQuarantine : Integer; $QuarantineReason : Text) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$QuantityToQuarantine | Integer | - | - |
$QuarantineReason | Text | - | - |
Returns: Object
Quarantine_Release
Function Quarantine_Release($QuantityToRelease : Integer; $ReleaseReason : Text) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$QuantityToRelease | Integer | - | - |
$ReleaseReason | Text | - | - |
Returns: Object
Quarantine_Scrap
Function Quarantine_Scrap($QuantityToScrap : Integer; $ScrapReason : Text) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$QuantityToScrap | Integer | - | - |
$ScrapReason | Text | - | - |
Returns: Object
startTransaction
Function startTransaction
validateTransaction
Function validateTransaction
cancelTransaction
Function cancelTransaction
InTransaction
Function InTransaction -> $InTransaction : Boolean
Returns: Boolean
_RecordStockMovement
Function _RecordStockMovement($Quantity : Integer; $From_LocationID : Integer; $To_LocationID : Integer; $From_Type : Text; $To_Type : Text; $Reason : Text; $AdviceNote : Integer) -> $Stock_MovementEntity : cs.Stock_MovementEntity
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$Quantity | Integer | - | - |
$From_LocationID | Integer | - | - |
$To_LocationID | Integer | - | - |
$From_Type | Text | - | - |
$To_Type | Text | - | - |
$Reason | Text | - | - |
$AdviceNote | Integer | - | - |
Returns: cs.Stock_MovementEntity
SetQuarantineReason
Function SetQuarantineReason($QuarantineReason : Text) -> $lockObject : Object
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$QuarantineReason | Text | - | - |
Returns: Object
GetAvailableQuantity
Function GetAvailableQuantity($StockLocation : Integer) -> $AvailableQuantity : Integer
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$StockLocation | Integer | - | - |
Returns: Integer
GetQuarantinedQuantity
Function GetQuarantinedQuantity -> $QuarantinedQuantity : Integer
Returns: Integer
GetStockEntitySelection
Function GetStockEntitySelection -> $EntitySelection : 4D.EntitySelection
Returns: 4D.EntitySelection
GetNewStockQuarantineStatus
Function GetNewStockQuarantineStatus -> $QuarantineNewStock : Boolean
Returns: Boolean
GetQuarantineReason
Function GetQuarantineReason -> $QuarantineReason : Text
Returns: Text
Generated from Stock.4dm