create_cost_line
Add a cost line to a project's budget list: what the money is for, the amount in the PROJECT currency, and whether it is EXPECTED, COMMITTED or SPENT. There is no currency argument: convert the amount first. A SPENT line counts in the project's earned value actual cost. Access: the project budget's write rule (project.edit and budget.read on the project).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | The day, YYYY-MM-DD; null clears it. A SPENT line counts in earned value actual cost from this day (from the day it was entered when there is none). | |
| note | No | Free text, at most 2000 characters; null clears it. | |
| label | Yes | What the money is for, e.g. "Electrical works". 1 to 200 characters. | |
| amount | Yes | The amount in the PROJECT currency, at most 2 decimal places, 0 or more. | |
| status | No | EXPECTED (planned, nothing ordered), COMMITTED (ordered, a purchase order), SPENT (paid or invoiced). Defaults to EXPECTED on create. | |
| taskId | No | A task in the same project this cost belongs to; null clears it. | |
| category | No | The project's own grouping word, e.g. "Works". At most 80 characters; null clears it. | |
| projectId | Yes |