Skip to content

Journal Entry Controls

This page documents the complete control framework around journal entries in PinkApple ERP — from creation through posting, approval, and correction.

Journal Entry Lifecycle

DRAFT → PENDING_APPROVAL → APPROVED → POSTED
                ↓                        ↓
            REJECTED              REVERSED / VOIDED
StateDescriptionCan Be Modified?
DRAFTEntry created but not submittedYes — amounts, accounts, memo can change
PENDING_APPROVALSubmitted for approvalNo — locked for review
APPROVEDPassed approval chainNo — awaiting posting
POSTEDWritten to the ledgerNo — permanent record
REJECTEDReturned by approver with commentsCan be edited and resubmitted
REVERSEDOffset by a new correcting entryNo — both entries remain
VOIDEDMarked invalid before postingNo — remains as void record

Who Can Do What

Creation Controls

ControlEnforcement
Only authorised users can create entriesCREATE_GL_JOURNAL_ENTRY permission required
Entries must specify a valid fiscal periodSystem resolves from journal_date — rejects if period is closed
All COA accounts must be active and approvedInvalid COA IDs are rejected at creation
Entry must have at least 2 linesSingle-line entries are blocked
Debits must equal creditsValidated before save; unbalanced entries rejected
Business unit must be specified per lineEach line carries explicit BU assignment
Control accounts require sub-ledgerIf a COA has sub-ledgers, sub_ledger_id is mandatory

Approval Controls

ControlEnforcement
Creator cannot approve own entrySystem enforces different user_id for creation vs approval
Monetary thresholds trigger multi-step approvalConfigurable per approval policy
Approval chains are sequentialStep 2 cannot approve until Step 1 completes
Rejected entries require commentsApprover must provide rejection reason
SLA tracking on approval stepsEscalation if step exceeds configured hours
Authority limits per userMaximum amount a single approver can authorise

Posting Controls

ControlEnforcement
Only approved entries can be postedapproval_status = 'APPROVED' check
Posting date must be in an open periodHARD_CLOSED or LOCKED periods block posting
Soft-closed periods require elevated permissionallow_soft_closed_posting flag
Backdating beyond lag window blockedConfigurable GL_MAX_POSTING_LAG_DAYS
Future posting can be disabledGL_ALLOW_FUTURE_POSTING configuration
Till-based posting requires open business dayTeller entries linked to active till session

Posting Channels

Every entry is tagged with how it was created:

ChannelDescriptionApproval Behaviour
BACKOFFICEManual entry by accountantFull approval chain applies
TELLERPosted through till/teller sessionMay have lower threshold
SYSTEMSystem-generated (EOD, accruals)Typically auto-approved
APIExternal integrationDepends on API configuration

Batch Management

Journal entries are grouped into batches:

Batch StateDescription
OPENBatch accepting new entries
CLOSEDNo more entries can be added
CANCELLEDStale batch cancelled by cleanup process

Stale Batch Cleanup

The system automatically cancels:

  • DRAFT batches older than 30 days (configurable)
  • OPEN batches older than 60 days with no posted entries

This prevents abandoned batches from cluttering the ledger.

Correction Procedures

Before Posting (DRAFT/PENDING)

  • Entry can be edited directly (amounts, accounts, memo)
  • Entry can be voided — sets voided_flag = 1, excluded from all calculations
  • Both actions are logged in the activity trail

After Posting

  • Entry cannot be edited or deleted
  • Reversal is the only correction method:
    1. System creates a new entry with inverted amounts
    2. Original entry: reversed_flag = 1, reversed_entry_id = new_entry_id
    3. New entry: references original in source_id
    4. Both remain permanently visible

Auto-Reversal (Accruals)

Entries with auto_reverse_date set are automatically reversed on that date:

  • Used for month-end accruals that should reverse on day 1 of next period
  • System procedure process_accrual_auto_reversals handles this
  • Reversal is logged with source_type and links to original

Numeric Precision

AspectPrecision
Journal line amountsDECIMAL(18,4) — 4 decimal places
Exchange ratesDECIMAL(18,6) — 6 decimal places
Balance tablesDECIMAL(18,2) — 2 decimal places
Balance check tolerance0.01 — entries within 1 cent are considered balanced

Concurrent Access Controls

  • Optimistic locking via versioning timestamp on all GL tables
  • Batch-level locking — only one user can post to a batch at a time
  • Period-level protection — period state changes are atomic transactions

Regulatory Compliance Mapping

RequirementHow PinkApple Meets It
SOX Section 302 (Management certification)Complete audit trail with user attribution
SOX Section 404 (Internal controls)Segregation of duties, approval chains, authority limits
IAS 8 (Accounting policy changes)Adjustment periods (13-16) for prior-period corrections
ISA 240 (Fraud considerations)Activity log, IP tracking, same-user approval prevention
IFRS 13 (Fair value)Exchange rate sources tracked per entry
Local banking regulationsPeriod lock, daily balance capture, till reconciliation

Control Summary for Auditors

The following controls operate automatically without user intervention:

  1. ✅ Every entry is balanced (debits = credits) — enforced at database level
  2. ✅ Every action is logged with user, IP, timestamp — cannot be disabled
  3. ✅ Posted entries cannot be modified — only reversed
  4. ✅ Period controls prevent back-posting — state machine enforced
  5. ✅ Control accounts require sub-ledger specification — prevents unallocated postings
  6. ✅ Sub-ledger totals checked against control at period close — blocks close if mismatched
  7. ✅ Stale drafts auto-cancelled — prevents orphaned entries
  8. ✅ Cash accounts checked for overdraft — prevents negative cash balances
  9. ✅ Approval enforces different user than creator — SOD compliance
  10. ✅ Daily balance capture at 10 hierarchy levels — full audit evidence

Next Steps

PinkApple ERP by Stat Solutions Network