[POST] .../v1/invoiceoperation/edit
Edits operations account-invoice. Use this method while the account-invoice is locked to update one or more invoice item rows before the invoice is posted or sent. The request body is a root JSON array; it must contain 1 to 250 operations, each id is required and optional quantity, price and vat_value values are validated only when they are provided. All selected operations must belong to one invoice document and that parent invoice must be locked by the current request user, not performed, not deleted_mark and not deleted. The current request user must have invoice operation edit permission and the successful response returns row_affected and ids of changed operations; empty changes, validation, permission, lock, document-state and database failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | Int64 | Required | Invoice operation ID. |
| price | Decimal | Optional | Item unit price. If null, the stored price is not changed; when provided, it must be zero or greater and no greater than 99999999999. |
| quantity | Decimal | Optional | Item quantity. If null, the stored quantity is not changed; when provided, it must be greater than zero and no greater than 999999999. |
| vat_value | Decimal | Optional | VAT rate value. If null, the stored VAT value is not changed; -1 is accepted for without-VAT behavior. |
Request Example
[
{
"id": 9101,
"quantity": 2,
"price": 49500,
"vat_value": 12
}
]
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": [
9101
]
}
}