generate_invoice_from_job
Create a draft AR invoice from a job's approved timesheets and billable expenses without posting to the general ledger.
Instructions
Generate a DRAFT AR invoice from a job's approved timesheets and billable expenses — the Job → invoice bridge. Creates a draft invoice (does not post to GL). Requires the Workflow module and the write scope. Confirm the job and date with the user before calling, then verify the created invoice with get_invoice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job ID to invoice | |
| due_date | No | Due date (YYYY-MM-DD) | |
| customer_id | No | Override customer ID for the invoice | |
| invoice_date | Yes | Invoice date (YYYY-MM-DD) — required | |
| gl_ar_account_id | No | AR GL account ID for the invoice header | |
| include_expenses | No | Include billable expenses (default: true) | |
| include_timesheets | No | Include approved timesheet lines (default: true) | |
| revenue_gl_account_id | No | Default revenue GL account ID for lines |