Saltar al contenido

app.invoices

TablaSeguridad a nivel de fila activa

Invoices issued to clients (Receivable) and received from vendors (Payable). Totals and balances are derived (app.invoice_totals). A closed production refuses new invoices (invariant 10).

Clave primaria: id

Columnas de app.invoices
ColumnaTipoAdmite nulosDescripción
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.projects on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id
project_iduuidNoProject the invoice belongs to.Hace referencia a app.projects.id
directionapp.money_directionNoReceivable (we bill) or Payable (we are billed).
counterparty_iduuidSíClient billed or vendor billing; NULL when a person engaged as an individual is the payee.Hace referencia a app.counterparties.id
invoice_numbertextSíInvoice number: ours for a receivable, the vendor's identifier for a payable.
issued_ondateSíDate the invoice was issued.
due_ondateSíDate payment is due.
currency_codecharacter(3)NoISO 4217 currency of the invoice.Hace referencia a private.currencies.currency_code
invoice_stateapp.invoice_stateNoInvoice state. Changes only through the invoice RPCs.
deleted_attimestamp with time zoneSíSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidSíPerson who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidSíPerson who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id
payee_person_iduuidSíPerson billing as an individual (a payable for someone engaged with no company account). Exactly one of counterparty_id and payee_person_id is set.Hace referencia a app.people.id
engagement_iduuidSíEngagement the invoice bills, when it bills one; always set for a person payee.Hace referencia a app.engagements.id