PaulRentACar Docs
Financial

Accounting Subledger

Understand the RAC accounting subledger, including events, balanced entries, COA mappings, summary journal posting, subledgers, reconciliation, credit notes, and payment allocations.

Accounting Subledger

The Accounting Subledger is the bridge between your Rent a Car operational system and your organization's general ledger or ERP. It captures every financially significant event, generates balanced double-entry accounting records, and produces summary journal batches ready for export to your external accounting system.

The RAC CRM operates as a subledger — it does not replace your general ledger. Operational detail lives here; summary journals are posted to your ERP.


Architecture Overview

The accounting module follows a strict data flow:

Operational Transaction
  → AccountingEvent (immutable record)
    → AccountingEntry + AccountingEntryLine (balanced debits/credits)
      → Subledger Entries (customer, contract, deposit, corporate)
        → AccountingPostingBatch (summary grouping)
          → Export / ERP Integration
            → Reconciliation

Every step is auditable. No accounting record can be directly edited — corrections are made via reversal entries.


Accounting Events

An accounting event is an immutable record created whenever a financially significant action occurs. Events are the single source of truth for all downstream accounting entries.

Complete Event Type Reference

#Event CodeDescriptionTypical Debit AccountTypical Credit Account
1invoice_issuedInvoice generated and sent to customerAccounts ReceivableRental Revenue
2payment_receivedCustomer payment recordedCash/BankAccounts Receivable
3payment_reversedPayment voided or reversedAccounts ReceivableCash/Bank
4payment_allocatedPayment allocated to specific invoicesAccounts Receivable (allocated)Accounts Receivable (general)
5deposit_collectedSecurity deposit captured from customerSecurity Deposit HoldingCustomer Deposit Liability
6deposit_releasedSecurity deposit returned to customerCustomer Deposit LiabilitySecurity Deposit Holding
7deposit_forfeitedSecurity deposit kept due to chargesCustomer Deposit LiabilityDamage/Fine Revenue
8deposit_adjusted_to_invoiceDeposit applied against outstanding invoiceCustomer Deposit LiabilityAccounts Receivable
9credit_note_issuedCredit note applied to customer balanceRental Revenue (contra)Accounts Receivable
10refund_approvedRefund approved for processingAccounts ReceivableRefund Liability
11refund_paidRefund sent to customerRefund LiabilityCash/Bank
12damage_charge_approvedDamage charge approved and billedAccounts ReceivableDamage Revenue
13fine_charged_to_customerTraffic fine passed through to customerAccounts ReceivableFine Revenue
14salik_charged_to_customerSalik toll charge passed throughAccounts ReceivableSalik Revenue
15writeoff_approvedUncollectible balance written offBad Debt ExpenseAccounts Receivable
16accounting_reversal_approvedReversal entry for a prior postingVaries (reversal of original)Varies (reversal of original)

Events are created at the exact moment of the operational action and are never deleted or modified. If an error is found, a new reversal event is created instead.


Balanced Entry Generation

Every accounting entry produced by the system must be balanced — total debits must equal total credits. This is enforced at the database level.

Entry Structure

An accounting entry consists of a header and one or more lines:

FieldDescription
Entry IDUnique identifier (UUID)
Event IDLink to the originating accounting event
Entry DateDate the entry is recorded
Tenant IDTenant ownership for multi-tenant isolation
Business Unit IDBusiness unit / cost center
Branch IDBranch where the transaction occurred
CurrencyTransaction currency (default AED)
Statusdraft, validated, approved, posted, reversed
Total DebitSum of all debit line amounts
Total CreditSum of all credit line amounts

Each line includes:

FieldDescription
Account CodeChart of Account code (from COA mapping)
Debit AmountDebit value (0 if credit)
Credit AmountCredit value (0 if debit)
DescriptionHuman-readable description
Cost CenterOptional cost center override
Tax CodeVAT/tax code if applicable

If a COA mapping is missing for a transaction type, the system routes the amount to a configured Suspense Account and flags the entry as exception. The accounting team must resolve these exceptions before the posting batch can be approved.


Chart of Account (COA) Mappings

COA mappings translate operational transaction types into the chart of accounts used by your ERP. Each tenant configures their own COA mapping.

COA Mapping Table Structure

FieldDescription
Tenant IDWhich tenant this mapping belongs to
Transaction TypeThe event code (e.g., invoice_issued)
Directiondebit or credit
Account CodeGL account code in your ERP
Account NameHuman-readable name for reference
Cost CenterDefault cost center (optional)
Tax CodeDefault tax code (optional)
Is ActiveWhether this mapping is currently in use

Example COA Mapping Configuration

Transaction TypeDirectionAccount CodeAccount NameCost Center
invoice_issuedDebit1100-001Accounts Receivable
invoice_issuedCredit4100-001Rental RevenueCC-RENTAL
payment_receivedDebit1200-001Cash & Bank
payment_receivedCredit1100-001Accounts Receivable
deposit_collectedDebit1300-001Security Deposit Holding
deposit_collectedCredit2100-001Customer Deposit Liability
damage_charge_approvedDebit1100-001Accounts Receivable
damage_charge_approvedCredit4200-001Damage RevenueCC-OPS
fine_charged_to_customerDebit1100-001Accounts Receivable
fine_charged_to_customerCredit4300-001Fine RevenueCC-OPS
writeoff_approvedDebit5100-001Bad Debt ExpenseCC-FIN
writeoff_approvedCredit1100-001Accounts Receivable

Before the first posting batch can be generated, all required COA mappings must be configured. Navigate to Settings → Accounting → COA Mappings to complete this setup.


Summary Journal Posting Batches

Posting batches group validated accounting entries into summary journals for ERP export. This reduces the volume of data sent to your external system.

Posting Batch Lifecycle

StatusDescriptionWho
GeneratedBatch created by the system from approved entriesSystem (scheduled or manual trigger)
ValidatedAll entries balanced, no exceptions, no duplicatesSystem (auto on generation)
Pending ApprovalAwaiting finance manager approvalSystem (auto after validation)
ApprovedApproved for exportFinance manager (accounting:approve_posting_batch)
ExportedExport file generated or API call madeSystem (auto on approval) or manual
AcknowledgedERP confirmed receiptSystem (webhook) or manual confirmation

Exception Statuses

StatusMeaningAction Required
FailedExport failed (API error, file error)Investigate and retry
Partially FailedSome lines exported, some failedResolve failed lines and retry
ReversedBatch reversed via reversal entriesNew batch replaces this one
CancelledBatch cancelled before exportEntries return to unbatched pool

Batch Summary Grouping

Summary journal lines group transactions by:

  1. Tenant — Always separated by tenant
  2. Business Unit — Grouped by cost center / business unit
  3. Branch — Grouped by branch
  4. Posting Date — Grouped by accounting date
  5. Currency — Grouped by transaction currency
  6. Account Code — Aggregated by GL account
  7. Tax Code — Separated by tax treatment

Step-by-Step: Generate and Export a Posting Batch

Navigate to Accounting → Posting Batches — View existing batches or create a new one.

Click "Generate Batch" — Select the date range for entries to include.

Review validation results — The system shows total entries, total debit/credit, and any exceptions.

Submit for approval — The batch moves to Pending Approval.

Manager reviews and approves — The finance manager opens the batch, reviews summary lines, and clicks Approve.

Export — The system generates the export file (CSV, Excel, JSON, or API push). Download or auto-transmit to ERP.

Acknowledge — Once the ERP confirms receipt, mark the batch as Acknowledged.


Subledgers

The system maintains four subledger types that provide detailed transaction histories for specific entity categories.

Customer Subledger

Shows all financial activity for a specific customer across all contracts and invoices.

FieldDescription
Customer IDThe customer's unique identifier
Transaction DateDate of the financial event
Event TypeThe accounting event code
Reference DocumentInvoice number, payment reference, etc.
Debit AmountAmount debited
Credit AmountAmount credited
Running BalanceOutstanding balance for this customer
Contract ReferenceRelated contract number (if applicable)

Contract Subledger

Tracks all financial entries tied to a specific rental contract.

FieldDescription
Contract IDThe contract's unique identifier
Transaction DateDate of the financial event
Event TypeThe accounting event code
Line ItemSpecific invoice line (if applicable)
Debit AmountAmount debited
Credit AmountAmount credited
Running BalanceNet financial position of this contract

Deposit Subledger

Tracks security deposit activity per deposit record.

FieldDescription
Deposit IDThe deposit's unique identifier
Transaction DateDate of the financial event
Event Typedeposit_collected, deposit_released, deposit_forfeited, etc.
AmountTransaction amount
Running BalanceCurrent held deposit amount
Related InvoiceInvoice linked to forfeiture or adjustment

Corporate Subledger

Tracks financial activity for corporate accounts, including monthly billing batches.

FieldDescription
Corporate Account IDThe corporate account identifier
Transaction DateDate of the financial event
Contract ReferencesAll contracts billed under this corporate account
Monthly SummaryAggregated monthly charges
Payment HistoryPayments received against corporate invoices
Outstanding BalanceTotal amount due from corporate account

Reconciliation

Reconciliation ensures that the accounting subledger is consistent, complete, and accurate. The system supports several reconciliation views.

Reconciliation Types

TypeWhat It ChecksResolution
Generated but unposted entriesEntries created but not yet in a posting batchGenerate a new batch or investigate
Failed/partially failed batchesExport errors or partial completionsRetry failed lines or create new batch
Customer balance formulaΣ(invoices) − Σ(payments) − Σ(credit notes) = customer balanceAdjust entries or issue credit notes
Contract balance formulaΣ(line items) − Σ(allocations) = contract balanceVerify all charges are invoiced
Deposit liabilityΣ(held deposits) = deposit liability account balanceRelease or forfeit stale deposits
Payment clearingGateway settlements match recorded paymentsInvestigate discrepancies
Exported batch acknowledgementAll exported batches acknowledged by ERPRe-export or contact ERP admin
Duplicate posting preventionNo duplicate entries for same eventRemove duplicates via reversal

Reconciliation should be run at least weekly. Navigate to Accounting → Reconciliation to view the reconciliation dashboard and run checks.


Payment Allocations

Payments can be allocated across multiple invoices, and a single invoice can receive multiple payments.

Allocation Rules

  • One payment may settle multiple invoices
  • One invoice may have multiple payments applied
  • Partial allocations are supported
  • Allocations are tracked in the customer subledger
  • Allocation reversals require permission and create an audit trail

Step-by-Step: Allocate a Payment Across Invoices

Open the payment record — Navigate to the payment from the customer's financial history.

Click "Allocate" — The system shows all open invoices for this customer.

Select invoices — Check the invoices to allocate against. The system auto-fills amounts.

Adjust amounts — Override auto-filled amounts for partial allocations.

Confirm allocation — The system creates allocation entries and updates invoice statuses.


Write-Offs

Write-offs are used to clear uncollectible balances. They require approval and create an audit trail.

Write-Off Lifecycle

StatusDescription
DraftWrite-off request created
Pending ApprovalSubmitted for manager approval
ApprovedWrite-off approved by authorized manager
PostedAccounting entry generated and included in next posting batch

Write-offs above the tenant-configured threshold require senior finance manager approval. All write-offs create an writeoff_approved accounting event and are fully auditable.


Required Permissions

ActionPermission Code
View accounting entriesaccounting:read
Configure COA mappingsaccounting:configure
Generate accounting entriesaccounting:generate_entries
Validate entriesaccounting:validate_entries
Approve entriesaccounting:approve_entries
Generate posting batchaccounting:generate_posting_batch
Approve posting batchaccounting:approve_posting_batch
Export posting batchaccounting:export_posting_batch
Acknowledge posting batchaccounting:acknowledge_posting_batch
Reverse an entryaccounting:reverse_entry
View reconciliationaccounting:view_reconciliation
Close accounting periodaccounting:close_period
Create credit notecredit_note:create
Approve credit notecredit_note:approve
Issue credit notecredit_note:issue
Read subledgersubledger:read
Export subledgersubledger:export
Create write-off requestwriteoff:create
Approve write-offwriteoff:approve
Post write-offwriteoff:post

On this page