ERP Core / Accounting

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 AttributePurpose
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 ActionAction CodeBusiness Trigger Event
CreatedcreatedNew voucher draft, currency, account, or cost center registered.
UpdatedupdatedAccount properties, currency metadata, or exchange rate updated.
SubmittedsubmittedVoucher passes zero-sum validation and enters pending approval state.
ApprovedapprovedVoucher approved by independent checker (Maker-Checker enforced).
RejectedrejectedVoucher rejected by approver with documented rejection reason.
PostedpostedVoucher committed to General Ledger, rendering it strictly immutable.
ReversedreversedPosted voucher neutralized via equal-and-opposite Storno reversal voucher.
Period Lockedperiod_lockedFiscal period closed or hard-locked against future postings.
Period Reopenedperiod_reopenedLocked period administrative reopening with justification reason.
Year-End Closedyear_end_closedFiscal 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:

StrategyUse Case
Reversing Journal Entry (Storno)Create an equal and opposite journal voucher on the same date to cancel the original.
Credit NoteReduce a previously recognized revenue or receivable.
Debit NoteIncrease 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.

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