Write a schedule
contracts_scheduleAdds a line a contract invoices at its own rhythm, or changes one (schedule_id). The keys are sequence, product_id, product_code, name, description, quantity, unit_code, unit_price, tax_code, frequency, next_on, until, indexation, auto_post. frequency is one of weekly, monthly, quarterly, yearly; next_on is the first day of the next period to issue; until the last day a period may start. The tax is named by its code in the company's list (list_accounts and describe_pack give them), never by a rate. A schedule from a product (product_code) takes the product's name, unit, price and tax where the patch gives none. indexation is a JSON object kept as data: index, formula, base, base_on, next_on. auto_post: true books every document it issues, which needs the right to post. Ask the user before setting auto_post.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"company_id": "<company_id>",
"contract_id": "<contract_id>",
"patch": "<patch>"
},
"name": "contracts_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patch | Yes | The fields to set: sequence, product_id, product_code, name, description, quantity, unit_code, unit_price, tax_code, frequency, next_on, until, indexation, auto_post. | |
| company_id | Yes | The company to work in. Ask list_companies if unsure. | |
| contract_id | Yes | The contract. contracts_list finds it. | |
| schedule_id | No | The schedule to change. Left out, a new one is added. |