As of version 2022.5.0, an overview of the stock status across all warehouses where an item is located can be displayed directly on the price list item.
Previously, it was only possible to view the overall warehouse status, or retrieve individual information from the stock cards.
The warehouse status can be retrieved, for example, by calling the GET method on the following URL:
http://localhost:5434/c/testovaci_2/cenik/(id=13)/$sum.xml
However, since other identifiers can also be used, the example below demonstrates usage with an item code.
Example URL:
http://localhost:5434/c/testovaci_2/cenik/(id='code:XR G19507002')/$sum.xml
The warehouse status can also be retrieved in JSON format, for example by simply replacing the ".xml" extension with ".json" in the URL.
The result is a consolidated overview of the stock status across all warehouses for the given item.
XML
<?xml version="1.0" encoding="utf-8"?>
<winstrom version="1.0">
<sum>
<stavyCenikGroupStavy>
<id>stavyCenikGroupStavy</id>
<stavyCenikGroupStavy>
<type>stavyCenikGroupStavy</type>
<msg>Stavy skladů:</msg>
</stavyCenikGroupStavy>
<values>
<PLZEŇ>
<msg>PLZEŇ</msg>
<unit>KS</unit>
<value>52.0</value>
</PLZEŇ>
<LIBEREC>
<msg>LIBEREC</msg>
<unit>KS</unit>
<value>0.0</value>
</LIBEREC>
<LBC>
<msg>LBC</msg>
<unit>KS</unit>
<value>1.0</value>
</LBC>
<celkem>
<msg>Celkem</msg>
<unit>KS</unit>
<value>53.0</value>
</celkem>
</values>
</stavyCenikGroupStavy>
</sum>
</winstrom>
JSON
{
"winstrom":{
"@version":"1.0",
"sum":{
"stavyCenikGroupStavy":{
"id":"stavyCenikGroupStavy",
"stavyCenikGroupStavy":{
"type":"stavyCenikGroupStavy",
"msg":"Stavy skladů:"
},
"values":{
"PLZEŇ":{
"msg":"PLZEŇ",
"unit":"KS",
"value":"52.0"
},
"LIBEREC":{
"msg":"LIBEREC",
"unit":"KS",
"value":"0.0"
},
"LBC":{
"msg":"LBC",
"unit":"KS",
"value":"1.0"
},
"celkem":{
"msg":"Celkem",
"unit":"KS",
"value":"53.0"
}
}
}
}
}
}
In the result, the individual stock statuses can be observed:
Warehouse PLZEŇ: 52 pcs
Warehouse LIBEREC: 0 pcs
Warehouse LBC: 1 pc
Total: 53 pcs
FAQ
Can the summary be retrieved for multiple price list items at once?
No, the summary can only be displayed when a single record is selected.
Can the summary be retrieved for multiple warehouses within a single item at once?
No, the warehouse is not an attribute of the price list, so it is not possible to filter by it.
