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]
| Stage | Business Responsibility |
|---|---|
| Draft Preparation | A user creates a journal voucher and attaches debit/credit lines. |
| Balance Validation | The system enforces the zero-sum rule before allowing progression. |
| Maker-Checker Approval | A second authorized user reviews and approves the voucher. |
| Posting | The voucher is committed to the GL and account balances are updated. |
| GL Lock | Posted 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 State | Trigger / Event | Next State | Business Validation Rule |
|---|---|---|---|
| Draft | Submit for review | Pending Approval | Voucher must balance; period must be open. |
| Pending Approval | Approver rejects | Rejected | Rejection reason is mandatory. |
| Pending Approval | Approver approves | Approved | Approver is not the voucher creator. |
| Approved | Post command issued | Posted | Period is open; no pending reversals exist. |
| Posted | Reverse command issued | Reversed | A reversing journal voucher is created and posted. |
State Invariants
- A voucher in
Rejectedstate can be edited and resubmitted. - A voucher in
Approvedstate cannot be edited; it must either be posted or sent back to draft by an authorized officer. - A voucher in
Postedstate can only transition toReversedthrough 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]
| Step | Description |
|---|---|
| Period Reconciliation | All sub-ledgers, bank statements, and control accounts are reconciled. |
| Income Summary Transfer | Revenue and expense accounts are closed to a temporary Income Summary account. |
| Retained Earnings Transfer | The net result is transferred to Retained Earnings within Equity. |
| Nominal Account Zeroing | Revenue and expense accounts begin the new period with zero balance. |
| Opening Balance Roll-forward | Asset, liability, and equity balances are carried forward as opening balances. |
| Period Lock | The 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.