Postman collection
Stock Read

pixiGetStockMovementTypesForOperation

Returns the stock movement types assigned to the stock movement operations of an application, with translated names and the default-type flag.

Returns the stock movement types that are linked to stock movement operations through the matching table StockMovementMatching.

  • Only operations whose Application equals @Application are returned. The default is Picco.
  • If @SMOKey is given, only the movement types of that single operation are returned. If @SMOKey is NULL, the types of all operations of the application are returned.
  • The name of each movement type (SMTName) comes from the Translation table (object StockMovementTypes.Name) in the language @LanguageID. The default language ID is 2.
  • Each row is one combination of movement type and operation. A movement type that is assigned to several operations appears once per operation.

The result has no explicit sort order.

Notes

  • All tables are read with NOLOCK, so uncommitted data can appear.
  • The filter on Application removes rows without an assigned operation. Despite the LEFT JOINs, movement types that are not assigned to any operation are therefore never returned.
  • The code checks @SMOKey with COALESCE(@SMOKey, '') = ''. Because the parameter is an int, the empty string is converted to 0. Passing 0 therefore behaves like NULL and returns all operations of the application.
  • If no translation exists for the requested language, SMTName is NULL. The procedure does not fall back to another language.
  • The code does not document which language @LanguageID = 2 stands for. This depends on the language IDs configured in the Pixi database.

Tables used

StockMovementTypes · Read StockMovementMatching · Read StockMovementOperations · Read Translation · Read
SQL object:
dbo.pipiGetStockMovementTypesForOperation
Updated at 2026-10-30