ShRepBillOfBalance
| Purpose | Request for the "Statement of Balances" report |
| Request type | Asynchronous |
| Supported agent version, sh | v1(sh4, sh5), v2(sh5) |
In sh5, grouping options differ significantly.
Request format
{
"taskType":"ShRepBillOfBalance",
"params":{
"async":{
"objectId": number,
"timeout": number
},
"reportParams":{
"reportDate":{
"date": "YYYY-MM-DD"
},
"goodsGroup":{
"rid": number,
"withNestedGroups": number
},
"category":{
"mainRid": number,
"bookeepingRid": number
},
"classify":{
"itemRid": number
},
"store":{
"rid": number,
"groupRid": number
},
"currency":{
"rid": number
},
"constraints":{
"groupFor": "string",
"onlyWithMovementForStore": number
},
"remnants":{
"condition": "string",
"value": "string"
}
}
}
}Parameter | Type | Mandatory | Description |
|---|---|---|---|
| taskType | string | + | Task type |
| async | Asynchronous method | ||
| timeout | int | - | Agent response timeout in seconds, default is 120 seconds |
| objectId | int | + | Restaurant code in the licensing system |
| reportParams | |||
| reportDate | + | ||
| date | string | + | The date for which the report will be created |
| goodsGroup | |||
| rid | int | rid of the item group | |
| withNestedGroups | int | include data on nested groups in the report (0 - no, 1 - yes) | |
| category | |||
| mainRid | int_or_null | rid of main category | |
| bookeepingRid | int_or_null | rid of accounting category | |
| classify | |||
| itemRid | int_or_null | rid of item classifier values | |
| store | |||
| rid | int_or_null | rid of the warehouse. If this attribute is present, then the STORE.group_rid attribute should not be present. | |
| groupRid | int_or_null | rid of warehouse groups. If this attribute is present, then the STORE.rid attribute should not be present. | |
| store | + | ||
| rid | int | + | currencies rid |
| constraints | |||
| groupFor | enum | By what value to group the report. The attribute can take the values: - None - do not group (used if the attribute is missing); - ForStores - group by warehouses; - ForGoodGroups - group by item groups; | |
| onlyWithMovementForStore | int_or_null | display only products for which there are warehouse/warehouses transactions (0 - no, 1 - yes) | |
| remnants | Condition for the presence/absence of residues | ||
| condition | enum | Condition, can take the values: - Less - less; - NotMore - no more; - Equal - equal; - NotLess - no less; - More - more; - NotEqual - not equal; | |
| value | enum | The attribute can take the values: - Zero - zero; - MinimumStock - min. stock; - MaximumStock - max. stock; If REMNANTS.condition is not filled, then the value of the REMNANTS.value attribute is ignored. |
Response format
{
"responseCommon":{
"taskGuid": "guid",
"taskType": "ShRepBillOfBalance",
"objectId": number
},
"error":{
"wsError":{
"code": "string",
"desc": "string"
}
}
}Asynchronous response format
// Successful response
{
"taskResponse":{
"groups":[
{
"name": "string",
"id": number
}
],
"lines":[
{
"rid": number,
"goodName": "string",
"attributeText": "string",
"attributeNumber": "string",
"mUnitsRid": number,
"mUnitsName": "string",
"quantity": number,
"sumWithoutTax": number,
"sumNds": number,
"sumNsp": number,
"minReserve": number,
"maxReserve": number,
"groupId": "int_or_null"
}
]
},
"responseCommon":{
"taskGuid": "string",
"taskType": "ShRepBillOfBalance",
"objectId": number
}
}
// Response with error
{
"responseCommon": {
"taskGuid": "string",
"taskType": "ShRepBillOfBalance",
"objectId": number
},
"error": {
"wsError": {
"code": "string",
"desc": "string"
},
"agentError": {
"code": "string",
"desc": "string"
}
}
}