Saltar al contenido

app.expenses

TablaSeguridad a nivel de fila activa

Expenses. One expense posts to exactly one budget line (invariant 12): a single required budget line that never changes. Approval posts it to the ledger.

Clave primaria: id

Columnas de app.expenses
ColumnaTipoAdmite nulosDescripción
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.budget_lines on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id
budget_line_iduuidNoThe one budget line the expense posts to. Never changes.Hace referencia a app.budget_lines.id
counterparty_iduuidSíVendor paid, when there is one.Hace referencia a app.counterparties.id
submitter_person_iduuidSíPerson who submitted the expense, set from the session; they cannot approve it.Hace referencia a app.people.id
descriptiontextNoWhat was bought.
incurred_ondateNoDate the cost was incurred; its accounting period must accept postings when approved.
amount_minorbigintNoAmount in minor units of currency_code. An expense is a claim, so the amount is required.
currency_codecharacter(3)NoISO 4217 currency; equals the budget currency.Hace referencia a private.currencies.currency_code
expense_stateapp.expense_stateNoExpense state. Changes only through the expense 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