Create Invoice
create_invoiceGenerate a new invoice by providing client name and line items. Invoice number is auto-assigned, status defaults to draft, and date defaults to today.
Instructions
Create a new invoice. Requires client name and at least one line item. The invoice number is auto-generated. Defaults to draft status and today's date. Example: clientName='Acme Corp', items=[{description:'Consulting', quantity:10, unitPrice:150}], taxRate=21 / Crea una nueva factura. Requiere nombre del cliente y al menos un concepto. El numero se genera automaticamente. Por defecto estado borrador y fecha de hoy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientName | Yes | Client/customer name / Nombre del cliente | |
| items | Yes | Line items (each with description, quantity, unitPrice) / Conceptos de la factura | |
| issueDate | No | Issue date in ISO 8601 format (YYYY-MM-DD), defaults to today / Fecha de emision | |
| dueDate | No | Due date in ISO 8601 format (YYYY-MM-DD) / Fecha de vencimiento | |
| status | No | Invoice status (default: draft) / Estado de la factura | |
| notes | No | Additional notes shown on the invoice / Notas adicionales | |
| taxRate | No | Tax rate percentage (e.g. 21 for 21% IVA, 7 for IGIC) / Porcentaje de impuesto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| clientName | Yes | ||
| items | Yes | ||
| issueDate | No | ||
| dueDate | No | ||
| status | No | ||
| notes | No | ||
| taxRate | No | ||
| total | No | ||
| createdAt | No | ||
| updatedAt | No |