app.invoice_lines
TableRow level security on
Lines of an invoice. A NULL unit price is unpriced; an invoice with an unpriced line can be neither issued nor approved. Lines change only while the invoice is Proposed.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.invoices on insert; never accepted from the caller and never changed.References app.organizations.id |
| invoice_id | uuid | No | Invoice the line belongs to.References app.invoices.id |
| line_number | integer | No | Order of the line within the invoice. |
| description | text | No | What is billed. |
| quantity | numeric | No | Quantity. |
| unit_price_minor | bigint | Yes | Unit price in minor units of the invoice currency; NULL is unpriced. |
| budget_line_id | uuid | Yes | Budget line the line bills against, when there is one.References app.budget_lines.id |
| tax_rate_id | uuid | Yes | Tax rate applied to the line, when taxed.References app.tax_rates.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| urid | text | Yes | Dimension 2: canon discipline or category the line bills or is billed for, when it has no budget line or differs from it. The line posts to the explicit GL default of the item its budget line prices only while this is unset or the budget line's URID, else to this URID's class revenue or expense account, else to the counterparty type's default. |