Update a Sale
Permissions needed: any of (CREATE_CHECKUPS, EDIT_CHECKUPS, CREATE_EDIT_COUNTER_SALE, SELL_SERVICES)
Discontinued product validation (422) The following rules apply when a product is discontinued (soft-deleted):
-
A new sold_products entry whose product_id refers to a discontinued product is rejected.
-
For an existing treatment whose product is discontinued, quantity, unit_id, and purchase_order_items (both the set of IDs and their quantities) must not differ from the stored values.
-
For an existing sold_services[].products item whose product is discontinued, quantity, unit_id, and purchase_order_items (both the set of IDs and their quantities) must not differ from the stored values.
-
An existing sold item whose product is discontinued (or whose product no longer exists) may still be removed by omitting it from the payload; no stock adjustment is made for it on removal.
Query parameters
Parameters
Request body
Example request
{
"sold_products": [
{
"tax_rate_ids": [
57
]
}
],
"sold_services": [
{
"tax_rate_ids": [
57
]
}
]
}