SetPercentDiscount

[POST] .../v1/pos/chequeitemoperation/setpercentdiscount

Applies a percentage discount to a cash register cheque position Use this method to apply a percentage discount or allowance to one POS cheque item position. The request requires uuid and percent greater than zero and not greater than 100, locks the parent cheque through the operation row and returns row_affected after row totals are recalculated. The method checks the current request user, requires row percentage-discount permission and validates accepted cashier context and editable row state; missing fields, invalid percent, denied permission, invalid cheque state and storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
percent Decimal Required Discount percent.
uuid String Required Cash receipt line item 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
  }
}