Skip to content

Last reviewed: 2026-07-30

Journal Entry Contract

Canonical object: JournalEntry

Canonical child object: JournalEntryLine

Required concepts: - header - lines - id - company_id - journal entry number - posting date - financial period - source reference - explanation - balanced debits and credits - creation and posting attribution - posting mode - direct correction target when applicable

JournalEntry required fields: - id - company_id - journal_entry_number - posting_date - financial_period_id - source_type - source_id - explanation - status - posted_at - posted_by_actor_id - posting_mode - corrected_journal_entry_id for reversal or adjustment - correction_workflow_id for reversal or adjustment - correction_reason for reversal or adjustment - correction_evidence_source_document_id for reversal or adjustment

JournalEntryLine required fields: - id - journal_entry_id - account_id - description when applicable - debit amount - credit amount - currency - reversed_journal_entry_line_id for reversal lines

Rules: - Entries must balance before posting. - Posted entries are corrected through reversal or adjustment. - Routine, reversal, and adjustment entries all retain status posted. - A routine entry must use posting mode routine and must not carry correction target, workflow, reason, evidence, or reversed-line fields. - A reversal or adjustment must identify one same-company posted target entry, its correction workflow record, reason, and correction evidence Source Document. - A full reversal line must identify exactly one target line, preserve its account id, currency, and amount, and exchange debit and credit. - An adjustment line must not carry a reversed-line reference. - A target entry is not mutated to record corrected or reversed state. - Each line must reference an account. - Posted entries are append-oriented accounting records and must not be silently mutated. - Routine posting must use one central posting path. - Routine posting requires the posting date to resolve to an eligible financial period. - Routine posting requires active posting accounts unless an authorized historical or correction process allows otherwise. - Manual routine posting does not require an idempotency key in the initial posting foundation. - Source references may initially be stored as an opaque source type and source identifier until the Source Documents implementation is available. - Human-visible journal entry numbers are required for posted entries. - Journal entry numbers must be unique within a company, assigned by the central posting path, positive, increasing for successful postings, and immutable after posting. - The standard display format is JE- followed by the company-scoped number padded to at least six digits, such as JE-000001. - Journal entry number is a human-facing reference and lookup value. Entry identity remains stable by id for persistence, audit, imports, correction, reversal, and recovery.

Allowed statuses: - posted

Validation expectations: - debit and credit totals match. - each line has account and amount. - source, period, and journal entry number are present for posted entries. - journal_entry_number uniqueness by company. - persisted status values use the stable snake_case contract values defined by this contract. - debit and credit amounts are non-negative and a line must not carry both a debit and credit amount. - a posted entry has at least two lines. - routine posting rejects planned, soft-closed, and hard-closed periods unless a later authorized correction or close-adjustment process explicitly applies. - reversal and adjustment posting modes follow the Accounting Correction Contract's open, reopened, soft-closed, and hard-closed period rules. - reversal and adjustment entries receive new company-scoped journal entry numbers through central Accounting. - a reversal may use the target line's exact historical inactive or retired account; an adjustment requires an active direct-posting account.

Related truth pages: - ../accounting/journal-entries.md - ../accounting/posting-and-reversal.md - account.contract.md - financial-period.contract.md - money.contract.md - accounting-correction.contract.md