Stock Movements
StockMovement records material flow between item positions and ownership contexts.
This page covers movement records, movement type governance, and movement status lifecycle.
1. Business Meaning
1.1 What a Stock Movement Represents
StockMovement is an auditable operation over stock items:
- source item (
stockItemFrom), - target item (
stockItemTo), - quantity (
amount), - movement classification (
movementType), - synchronization/business status (
status).
1.2 Storno Semantics
Movement model supports reversal operations:
stornoMovement = truemarks reversal,stornoMovementIdlinks movement to the original movement record.
1.3 Movement Type Governance
StockMovementType is a validity-governed type register that controls movement classification and optional processing metadata.
2. Entity Reference: StockMovement (StockMovement)
| Field | Type | Required | Read-only | Description |
|---|---|---|---|---|
id | UUID | No | No | Movement primary key. |
key | String | No (create) | No | Business-readable movement key. |
status | StockMovementStatus | No | No | Movement status enum. |
stockItemFrom | String | No | No | FK to source StockItem.key. |
stockItemTo | String | No | No | FK to target StockItem.key. |
ownerId | UUID | No | No | Owner reference (context-dependent). |
ownerType | String | No | No | Owner type/classification value. |
amount | Float | No | No | Moved amount. |
entCatSpecRef | UUID | No | No | Optional catalog specification reference. |
stornoMovementId | UUID | No | No | FK to original movement ID for storno linkage. |
stornoMovement | Boolean | No | No | Reversal movement flag. |
movementType | String | No | No | FK code to StockMovementType.code. |
dataTags | List<String> | No | No | Optional labels/tags. |
chars | TsmChars | No | No | Dynamic movement attributes. |
description | String | No | No | Optional description. |
3. Enum Reference: StockMovementStatus (StockMovementStatus)
| Value | Meaning |
|---|---|
NEW | Newly created movement record. |
SYNCHRO_OK | Synchronization with external target succeeded. |
SYNCHRO_DATA_ERROR | Synchronization failed due to data/validation error. |
SYNCHRO_CANCELED | Synchronization was canceled. |
CANCELED | Movement is canceled in business lifecycle. |
4. Entity Reference: StockMovementType (StockMovementType)
| Field | Type | Required | Read-only | Description |
|---|---|---|---|---|
id | UUID | No | No | Movement type primary key. |
code | String | Yes | No | Technical unique code. |
name | String | Yes | No | Display name. |
validityFrom | Date | No | No | Validity start. |
validityTo | Date | No | No | Validity end. |
description | String | No | No | Optional description. |
localizationData | LocalizationData | No | No | Localization payload. |
tsmModule | String | No | No | Optional module code reference. |
entitySpecId | UUID | No | No | Optional entity specification reference. |
mnemonicCode | String | No | No | Optional mnemonic code. |
createPrivilege | String | No | No | Optional privilege constraint. |
icon | String | No | Yes | Optional icon metadata (read-only). |
config | Map<String, Any?> | No | No | Additional configuration payload. |
registry | Map<String, Any?> | No | No | Register payload. |
processingData | Object | No | Write-only | Transient processing context (max 32 top-level keys, max 64 KB, max depth 12). |
dataTags | List<String> | No | No | Optional labels/tags. |