SetPercentDiscount
[POST] .../v1/pos/doccheque/setpercentdiscount
Applies a percentage discount to a cash register cheque amount Use this method to apply a percentage discount or allowance to the entire POS cheque amount. The request requires uuid and percent greater than zero and not greater than 100, locks the cheque by uuid, checks the current request user, requires retail percentage-discount permission and returns row_affected after recalculation. The operation expects an editable cheque with positions; missing fields, invalid percent, denied permission, missing accepted cash register, invalid cheque state and recalculation errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| percent | Decimal | Required | Discount percent. |
| uuid | String | Required | Cash register cheque UUID. |
Request Example
{
"percent": 1.0,
"uuid": "00000000-0000-0000-0000-000000000000"
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"ids": [
null
],
"row_affected": 1
}
}