Skip to content

app.budget_lines

TableRow level security on

Budget lines (Section 7.4). The unit price is NULL when unpriced and never defaulted to zero; the extended amount is derived. The GL account is derived, never stored: the priced item's explicit GL default first, then the URID's class account, then the counterparty type's default (decision D13 as owner decision 39 reads it, private.gl_account_for_line).

Primary key: id

Columns of app.budget_lines
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.budgets on insert; never accepted from the caller and never changed.References app.organizations.id
budget_iduuidNoBudget the line belongs to.References app.budgets.id
line_numberintegerNoOrder of the line within the budget.
descriptiontextNoSentence-case line description.
line_typeapp.budget_line_typeNoCost, Labor, Fee or Contingency.
uridtextNoDimension 2: canon discipline or category the line spends on. Its class gives the GL account when the priced item carries no explicit GL default; the counterparty type's default applies only when neither gives one.
cost_center_iduuidYesDimension 1: cost center the line posts to.References app.cost_centers.id
grade_codetextYesPrice grade: base, elevated or premium (decision D11).References xpms.grade.code
element_idtextYesCatalog element priced by the line, when one applies. Its explicit GL default (purchase account) comes before the URID class's account.References xpms.elements.element_id
quantitynumericNoQuantity, in unit_basis.
unit_basistextYesUnit of the quantity from the controlled unit list.References xpms.dim_unit_alias.alias
unit_price_minorbigintYesUnit price in minor units of the budget currency; NULL is unpriced and renders as Unpriced.
xyzxpms.xyz_tagNoXYZ schema-family tag of the line.
xyz_basisapp.xyz_basisNoBasis of the XYZ tag: Category (equals the URID category's tag) or Declared.
deleted_attimestamp with time zoneYesSoft 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_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id
phase_codetextYesGated phase the line is spent in (Section 3.4).References xpms.dim_phase.phase_code
tier_codetextYesTier of experience the line serves (Section 3.5).References xpms.dim_tier.tier_code