[POST] .../v1/inoutoperation/copyoperationsfromdocinventory
Copies operations from inventory document in document write-off/cash-in. Use this method to fill a DocInOut document from a completed inventory document when stock differences should be written off or received. The request body must contain doc_from_id of the inventory document and doc_to_id of the target DocInOut document and the target document must already be locked by the current user. The inventory source must be closed, the target DocInOut must exist and use the same stock and the target document type controls whether positive or negative inventory differences are copied; missing ids, denied access, incompatible stocks, open inventory documents, no matching differences, lock failures or storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| doc_from_id | Int64 | Required | Source document ID to copy operations from. |
| doc_to_id | Int64 | Required | Destination document ID to copy operations into. |
Request Example
{
"doc_from_id": 5101,
"doc_to_id": 4201
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": [
8101
]
}
}