Draft invoice
solo_draft_invoiceStart an invoice as an editable draft. Nothing is final until you issue it. Gather the lines as the person describes the work — description, quantity or hours, rate — and SHOW them the numbers before issuing. Timing is their agreement with the client: ahead of the work, partial, or after — never question it (S-5). Never invent an amount or a rate (S-6). If there is no client yet, ask for the client's name, billing address, email, and the agreed terms — one question at a time — and create the customer first. The draft comes back with doc_url: a preview link that renders the real document marked DRAFT. Call solo_get_document to see that render yourself and hand the person the link BEFORE asking whether to issue; never hand-roll the document yourself. Effects: draft created with computed totals; preview link minted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | The work being billed. | |
| notes | No | Printed on the document (project reference, thanks, PO number they gave you). | |
| subject | No | One line above the table — project, period. Printed on the document. | |
| currency | No | Currency of this invoice, ISO 4217. Defaults to the company default; must be one of the company's currencies. | |
| customer_id | Yes | The client. An existing customer id. | |
| due_in_days | No | Days until due. Defaults to the customer's payment terms (net7 = 7, net30 = 30, immediate = 0); pass it only to depart from them for this invoice. Freezes into the due date at issue. |