WithMovement

Interface for entities that support inventory movements

Audience: Programmer

The WithMovement interface is implemented by entities that can participate in inventory movements, enabling tracking of stock transfers and changes.

Fields

Field
Type
Description

movements

[Movement!]

List of associated movements

canMove

Boolean!

Whether movements are currently allowed

movementHistory

MovementConnection

Paginated movement history

Movement Types

Entities implementing WithMovement support:

  • Item Movements - Individual item transfers

  • Collection Movements - Batch transfers

  • Repository Movements - Location-to-location transfers

Implementing Types

  • InventoryItem

  • InventoryCollection

  • Repository

  • PickingOrderItem

  • ReceivingInboundItem

Usage

Movement Lifecycle

  1. Created - Movement planned

  2. Validated - Business rules checked

  3. Executed - Stock transferred

  4. Completed - Movement finalized

Validation Rules

Movements are validated for:

  • Sufficient stock availability

  • Repository permissions

  • Business rule constraints

  • Workflow approvals

Best Practices

  1. Check canMove before creating movements

  2. Use transactions for multi-item movements

  3. Track movement reasons with metadata

  4. Implement audit trails

  5. Consider movement reversals

See Also

Last updated

Was this helpful?