Accounting - Audit Trail & Compensating Strategies
Regulatory compliance, immutable audit logs, and correction strategies for the FMS domain.
The Accounting & FMS domain is designed to satisfy regulatory scrutiny, external audit requirements, and internal control frameworks. Every action leaves an immutable footprint, and every correction follows a formal compensating strategy rather than record destruction.
1. Regulatory Compliance & Forensic Audit Trail
Every state change, document approval, reversal, and period lock within the Accounting domain is captured into an immutable, append-only forensic audit log:
| Audit Attribute | Purpose |
|---|---|
Actor Identity (actor_id) | Identifies the user, automated system worker, or ACL background process that performed the action. |
Action (action) | Explicit state transition governed by standardized audit action types. |
Auditable Entity (auditable_type, auditable_id) | Polymorphic reference to the domain entity being altered (e.g. Journal Voucher, Fiscal Period, Currency). |
Timestamp (created_at) | Precise audit moment in UTC. |
Origin Context (origin_context) | Operational context and business process initiating the audit (e.g. voucher submission, exchange rate update, period lock). |
State Snapshots (before_state, after_state) | Complete record of the entity’s attributes immediately prior to and after mutation. |
Complete Audit Actions Catalog
| Audit Action | Action Code | Business Trigger Event |
|---|---|---|
| Created | created | New voucher draft, currency, account, or cost center registered. |
| Updated | updated | Account properties, currency metadata, or exchange rate updated. |
| Submitted | submitted | Voucher passes zero-sum validation and enters pending approval state. |
| Approved | approved | Voucher approved by independent checker (Maker-Checker enforced). |
| Rejected | rejected | Voucher rejected by approver with documented rejection reason. |
| Posted | posted | Voucher committed to General Ledger, rendering it strictly immutable. |
| Reversed | reversed | Posted voucher neutralized via equal-and-opposite Storno reversal voucher. |
| Period Locked | period_locked | Fiscal period closed or hard-locked against future postings. |
| Period Reopened | period_reopened | Locked period administrative reopening with justification reason. |
| Year-End Closed | year_end_closed | Fiscal year closed, nominal accounts zeroed, Retained Earnings transferred. |
Audit Invariants
- Audit log entries are strictly append-only. They can never be edited or deleted.
- Posted journal vouchers retain an unbroken lineage of approval actors, posting timestamps, and source aliases.
- Period open/close actions require an actor ID and a mandatory reason string.
2. Correction Through Reversals
Erroneous posted transactions are never deleted. The domain supports three compensating strategies:
| Strategy | Use Case |
|---|---|
| Reversing Journal Entry (Storno) | Create an equal and opposite journal voucher on the same date to cancel the original. |
| Credit Note | Reduce a previously recognized revenue or receivable. |
| Debit Note | Increase a receivable or correct an under-billed amount. |
Reversal Rules
- Every reversal document must reference the original journal voucher.
- Reversals pass through the same maker-checker and balance-validation workflow as original entries.
- Reversals are posted in an open accounting period, even if the original entry belongs to a closed period.
- The audit trail links the original entry, the reversal entry, and any replacement entry into a single correction chain.
Correction Chain Example
Original JV #1000 Reversal JV #1001 Replacement JV #1002
(Erroneous posting) (Storno reversal) (Corrected posting)
| | |
└───────────────────────────┴────────────────────────────┘
Correction Chain
Why Deletion Is Forbidden
Deleting a posted transaction would break:
- The immutable audit trail required by regulators.
- The sequential integrity of journal voucher numbering.
- The ability to reproduce historical financial statements exactly as originally reported.
- The compensating entry pattern that preserves the complete history of corrections.
3. Summary
The Accounting & General Ledger domain in Obelaw is a rigorous, event-driven bounded context that enforces financial correctness through immutable posted entries, zero-sum balancing, closed-period locks, and comprehensive audit trails. It remains isolated from operational domains via an Anti-Corruption Layer and consumes only the financial events necessary to maintain the canonical ledger.