ShDocReceivingReport
| Purpose | Creating a Receiving Report |
| Request type | Asynchronous |
| Supported agent version, SH | v1 — SH4, SH5 |
In SH4, the type of accounting in which a document is created is obtained from the rights of the user through whom authorization occurs — it is specified in the configurator on the Store House tab.
If the user has rights for both accounting and special accounting, then error 210 will be displayed.
In SH5:
- The document code consists of only one part, which is filled in the textcode field
- It is not possible to add a note to the report being created
- If a VAT percentage rate is specified, it should already be entered into Store House as standard
- You can specify both the VAT amount and the percentage rate at the same time
- The document activity is determined by the attribute activated by the recipient. It is transmitted via the API.
Request format
|
Parameter | Type | Mandatory | Description |
|---|---|---|---|
| taskType | string | yes | Task type |
| async | Asynchronous method call: either synchronous or asynchronous | ||
| sync | Synchronous method call: either synchronous or asynchronous | ||
| timeout | int | yes | Agent response time in seconds. Default is 120 seconds |
| objectId | int | yes | Restaurant code in the licensing system |
| doc | string | ||
| date | string | yes | The date for which the report will be created |
| corr | int | yes | rid of the correspondent |
| store | int | yes | rid of a warehouse or division |
| active | int | Activate the report: 0 — no, 1 — yes | |
| dueDate | int | Place the report first by date: 0 — no, 1 — yes | |
| note | string | Comment Not used in SH5 | |
| textCode | string | Text part of the document code In SH5, you need to specify the full document code in the field | |
| numCode | string | Digital part of the document number In SH5 the field is not used | |
| items | array | ||
| rid | int | item rid | |
| quantity | decimal | Quantity, fractional values supported | |
| mu | int | unit rid | |
| sum | Amount without VAT * 100 | ||
| vatSum | int | no | VAT amount * 100 |
| vatRate | int | no | VAT rate * 100 SH5 should already have this rate set as standard. |
Response format
|
Parameter | Type | Description |
|---|---|---|
| error | Error container | |
| objectId | int | Restaurant code in the licensing system |
| taskGuid | guid | Unique code for this task. Used when receiving a task via a queue |
| taskType | string enum | Task type |
Asynchronous response format
|
Parameter | Type | Mandatory | Description |
|---|---|---|---|
| doc | yes | ||
| rid | int | rid of the created document | |
| textCode | string | Text part of the created document number In SH5 this field contains the entire document number. | |
| numCode | string | The digital part of the created document number In SH5 it is not filled | |
| error | string enum | Error container |