app.journal_lines
TablaSeguridad a nivel de fila activa
Lines of a journal entry: one account, dimension 1 and 2, and either a debit or a credit. Immutable once the entry is posted. Posted lines are the Universal Posting Line (app.posting_lines).
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.journal_entries on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| journal_entry_id | uuid | No | Entry the line belongs to.Hace referencia a app.journal_entries.id |
| line_number | integer | No | Order of the line within the entry. |
| account_code | text | No | GL account from the fixed chart (Bible tab 29).Hace referencia a xpms.dim_gl_account.account_code |
| cost_center_id | uuid | Sí | Dimension 1 cost center.Hace referencia a app.cost_centers.id |
| urid | text | Sí | Dimension 2: canon discipline or category. |
| counterparty_id | uuid | Sí | Vendor or client the line concerns; NULL for revenue without one.Hace referencia a app.counterparties.id |
| element_id | text | Sí | Catalog element, when one applies.Hace referencia a xpms.elements.element_id |
| description | text | No | Sentence-case line description. |
| quantity | numeric | Sí | Quantity, when the line counts something. |
| unit_basis | text | Sí | Unit of the quantity from the controlled unit list.Hace referencia a xpms.dim_unit_alias.alias |
| debit_minor | bigint | No | Debit amount in minor units; zero on a credit line. |
| credit_minor | bigint | No | Credit amount in minor units; zero on a debit line. |
| currency_code | character(3) | No | ISO 4217 currency of the line.Hace referencia a private.currencies.currency_code |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |