Create an invoice
create_invoiceIssue an invoice for a client using billable time between two dates; totals come from logged entries, and the number defaults to INV--NNN.
Instructions
Issue an invoice for a client from billable time between two dates. Totals are computed on the server from the logged entries (one line per project). The number defaults to the next INV--NNN. This creates a permanent record; confirm the client, period and dates with the user first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Last day of the billed period | |
| from | Yes | First day of the billed period | |
| notes | No | Notes printed on the invoice (max 1,000 characters) | |
| client | Yes | Client id or exact client name | |
| number | No | Invoice number; defaults to the next INV-<year>-NNN | |
| due_date | No | Payment due date, YYYY-MM-DD, or null for none | |
| issue_date | Yes | The invoice date, YYYY-MM-DD | |
| compact_notes | No | Shorten entry descriptions to about 100 characters | |
| include_detail | No | Print each entry under the lines |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| hours | Yes | ||
| lines | Yes | One line per project | |
| total | Yes | Dollars | |
| client | Yes | ||
| number | Yes | ||
| period | Yes | "YYYY-MM-DD to YYYY-MM-DD" |