ERP Core / Accounting

Accounting - Operational Workflows & State Machines

Journal entry lifecycle, fiscal year-end close, and state transition tables for financial documents.

Operational Workflows & State Machines

The Accounting & FMS domain defines explicit workflows and state machines to ensure that every financial document moves through a controlled, auditable lifecycle.


1. Journal Entry Lifecycle

flowchart LR
    A[Draft Preparation] --> B{Balance Validation}
    B -->|Invalid| A
    B -->|Valid| C[Maker-Checker Approval]
    C -->|Rejected| A
    C -->|Approved| D[Posting]
    D --> E[General Ledger Lock]
StageBusiness Responsibility
Draft PreparationA user creates a journal voucher and attaches debit/credit lines.
Balance ValidationThe system enforces the zero-sum rule before allowing progression.
Maker-Checker ApprovalA second authorized user reviews and approves the voucher.
PostingThe voucher is committed to the GL and account balances are updated.
GL LockPosted entries become immutable and traceable in reporting.

Maker-Checker Separation

The approver of a journal voucher must be a different actor than its creator. This separation of duties prevents single-actor fraud and satisfies common internal control frameworks.


2. Journal Entry State Transitions

Current StateTrigger / EventNext StateBusiness Validation Rule
DraftSubmit for reviewPending ApprovalVoucher must balance; period must be open.
Pending ApprovalApprover rejectsRejectedRejection reason is mandatory.
Pending ApprovalApprover approvesApprovedApprover is not the voucher creator.
ApprovedPost command issuedPostedPeriod is open; no pending reversals exist.
PostedReverse command issuedReversedA reversing journal voucher is created and posted.

State Invariants

  • A voucher in Rejected state can be edited and resubmitted.
  • A voucher in Approved state cannot be edited; it must either be posted or sent back to draft by an authorized officer.
  • A voucher in Posted state can only transition to Reversed through a formal reversal document.

3. Fiscal Year-End Close

flowchart TB
    A[Period Reconciliation] --> B[Income Summary Transfer]
    B --> C[Retained Earnings Transfer]
    C --> D[Nominal Account Zeroing]
    D --> E[Opening Balance Roll-forward]
    E --> F[Period Lock]
StepDescription
Period ReconciliationAll sub-ledgers, bank statements, and control accounts are reconciled.
Income Summary TransferRevenue and expense accounts are closed to a temporary Income Summary account.
Retained Earnings TransferThe net result is transferred to Retained Earnings within Equity.
Nominal Account ZeroingRevenue and expense accounts begin the new period with zero balance.
Opening Balance Roll-forwardAsset, liability, and equity balances are carried forward as opening balances.
Period LockThe closed period is locked to prevent retroactive changes.

Close Preconditions

Before a fiscal year can be closed, the system verifies:

  • All journal vouchers for the period are posted.
  • All sub-ledgers reconcile with the General Ledger.
  • No prior period remains open.
  • All required audit adjustments have been recorded.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw