Pegasus Logo
Skip to content
PegasusDocs
FINANCIAL AUDIT

LedgerFinance

Sovereign Physical Distribution Platform · Cluster Node

v4.2.0
·
Last updated September 2026
·
10 min read

Class A financial accounting core tracking every cent and tiyin across supplier receivables, driver cash liability, and retailer credit balances.

In high-volume physical distribution, financial integrity is as critical as inventory accuracy. Pegasus implements an immutable double-entry journal ledger. Account balances are never directly updated; they are computed as the sum of immutable debit and credit lines. Every transaction sums strictly to zero.

Architecture & Performance Highlights

Int64 Units

Strict Minor Units

All monetary values are stored as 64-bit signed integers (tiyins/cents). Floating-point math is strictly forbidden.

Zero Sum

Sum-to-Zero Invariant

Every journal entry must balance mathematically: Σ(Debits) - Σ(Credits) = 0. Unbalanced entries are rejected at DB level.

Immutable

Immutable Audit Trail

Ledger rows cannot be updated or deleted. Corrections are made strictly via timestamped reversal journals.

Order-to-Cash Ledger Journal Example

Sequence Flow
1

1. Order Placed (Pre-paid): DEBIT Retailer_Accounts_Receivable, CREDIT Inventory_Committed_Liability

2

2. Warehouse Loaded: DEBIT In_Transit_Inventory, CREDIT Warehouse_Inventory_Asset

3

3. Cash Delivered: DEBIT Driver_Cash_Vault, CREDIT Retailer_Accounts_Receivable

4

4. Driver Reconciled: DEBIT Bank_Treasury_Settlement, CREDIT Driver_Cash_Vault

Zero Float Rounding Errors

Always divide discounts and VAT across line items using the largest remainder method to ensure line-item penny totals match the master invoice perfectly.