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
Applicationequals@Applicationare returned. The default isPicco. - If
@SMOKeyis given, only the movement types of that single operation are returned. If@SMOKeyisNULL, the types of all operations of the application are returned. - The name of each movement type (
SMTName) comes from theTranslationtable (objectStockMovementTypes.Name) in the language@LanguageID. The default language ID is2. - 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
Applicationremoves rows without an assigned operation. Despite theLEFT JOINs, movement types that are not assigned to any operation are therefore never returned. - The code checks
@SMOKeywithCOALESCE(@SMOKey, '') = ''. Because the parameter is anint, the empty string is converted to0. Passing0therefore behaves likeNULLand returns all operations of the application. - If no translation exists for the requested language,
SMTNameisNULL. The procedure does not fall back to another language. - The code does not document which language
@LanguageID = 2stands for. This depends on the language IDs configured in the Pixi database.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
Application
|
varchar(100) string |
Picco |
Application whose stock movement operations are evaluated. It is compared with Example: |
SMOKey
|
int | NULL |
Key of a stock movement operation to restrict the result to. Example: |
LanguageID
|
int | 2 |
Language ID used to read the translated movement type name from Example: |
Result set 1 · Always (can be empty)
One row per combination of stock movement type and stock movement operation of the requested application.
| Column | Type | Description |
|---|---|---|
SMTKey
|
int |
Key of the stock movement type ( |
SMOKey
|
int |
Key of the stock movement operation ( |
AskInGUI
Nullable |
string |
Value of |
TYPE
Nullable |
string |
Type value of the stock movement type ( |
SMTName
Nullable |
varchar(512) string |
Translated name of the movement type in the requested language. |
DefaultType
Nullable |
string |
Value of |
Response example
<SqlRowSet1>
<row>
<SMTKey>12</SMTKey>
<SMOKey>3</SMOKey>
<AskInGUI>1</AskInGUI>
<TYPE>1</TYPE>
<SMTName>Umlagerung</SMTName>
<DefaultType>1</DefaultType>
</row>
<row>
<SMTKey>15</SMTKey>
<SMOKey>3</SMOKey>
<AskInGUI>1</AskInGUI>
<TYPE>2</TYPE>
<SMTName>Korrektur</SMTName>
<DefaultType>0</DefaultType>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetStockMovementTypesForOperation>
<!-- <Application>Picco</Application> -->
<!-- <SMOKey>3</SMOKey> -->
<!-- <LanguageID>2</LanguageID> -->
</ns1:pixiGetStockMovementTypesForOperation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiGetStockMovementTypesForOperation>
<!-- <Application>Picco</Application> -->
<!-- <SMOKey>3</SMOKey> -->
<!-- <LanguageID>2</LanguageID> -->
</ns1:pixiGetStockMovementTypesForOperation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'Application' => 'Picco',
// 'SMOKey' => '3',
// 'LanguageID' => '2',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiGetStockMovementTypesForOperation', $soapArguments);
- SQL object:
- dbo.pipiGetStockMovementTypesForOperation