Skip to content

Client Ledger

Executive Summary

Purpose & Scope

  • Track and manage client on-account balances and loan advances
  • Scope includes: On-Account (OA) credits, loan advances, cash application integration, balance tracking
  • Out of scope: Loan approval workflow (future), interest calculations

Objectives

  • Maintain accurate client credit balances (on-account funds)
  • Track loan advances to clients
  • Enable application of on-account balances during cash receipt allocation
  • Support balance drawdown and reconciliation

Process Overview

Client Ledger Lifecycle

mermaid
flowchart TD
    Create[Create Ledger Entry] --> Type{Entry Type}
    Type --> OA[On-Account Entry]
    Type --> LOAN[Loan Entry]
    
    OA --> Posted[Post to GL]
    LOAN --> Posted
    
    Posted --> Available[Balance Available]
    Available --> Apply[Apply to Worksheet]
    Apply --> Reduced[Balance Reduced]
    Reduced -->|Has Balance| Available
    Reduced -->|Zero Balance| Closed[Entry Closed]

Figure 1: Client Ledger Entry Lifecycle

Core Rules & Requirements

Entry Types

TypeCodeDescriptionUse Case
On-AccountOAClient credit balanceOverpayment, prepayment
LoanLOANAdvance to clientCommission advance, float

Status Lifecycle

StatusCodeDescription
DraftDEntry created, not posted
ValidVPosted, balance available
ClosedCBalance fully applied/reversed

Posting Status

StatusCodeDescription
UnpostedUNot posted to GL
PostedPPosted to GL
CancelledXReversed/cancelled

Balance Tracking

Remaining Balance = Original Amount - Sum(Applied Amounts)
FieldDescription
client_ledger_amtOriginal entry amount
appliedAmtTotal applied via worksheets
remainingAmtAvailable balance

When remainingAmt reaches zero, client_ledger_open_item_ind becomes false and status changes to C (Closed).


Cash Application Integration

Client ledger entries can be applied during cash receipt allocation:

  1. User adds client ledger item to worksheet
  2. System creates cash_receipt_client_ledger record
  3. Upon worksheet approval, client ledger balance is reduced
  4. Worksheet return/reversal restores the balance

IMPORTANT

Client ledger applications follow the same approval workflow as receivable applications. They are not deducted until the worksheet is approved.


Reversal Rules

ScenarioAction
Worksheet returnedRestore ledger balance, create reversal record
Entry cancelledMark as X, restore any applied amounts

Reversal records track the original entry via reversal_of_ledger_id.

User Interface Specifications

Client Ledger Tab (Client Screen)

Purpose: View and manage client ledger entries for a specific client.

Columns:

ColumnDescription
Entry IDUnique identifier
NameUser-entered description
TypeOn-Account / Loan
AmountOriginal amount
BalanceRemaining amount
CurrencyEntry currency
StatusD / V / C
DealAssociated deal (optional)
Start/End DateEntry validity period
NotesUser notes

Actions:

  • Add New Entry
  • Edit (Draft only)
  • View Details

Add/Edit Client Ledger Dialog

Fields:

FieldTypeRequiredNotes
Entry TypeDropdownYesOA, LOAN
NameTextYesDescription
AmountDecimalYesMust be > 0
CurrencyDropdownYesDefault: USD
DealAutocompleteNoOptional association
Start DateDateNoWhen entry becomes valid
End DateDateNoWhen entry expires
NotesTextareaNoAdditional details

Validations:

  • Amount must be positive
  • Currency required
  • Name required

Client Ledger Selection (Worksheet)

Purpose: Add on-account or loan entries to a cash receipt worksheet.

Search Criteria:

  • Client
  • Deal
  • Entry Type (OA/LOAN)
  • Open Items Only (default: true)
  • Amount Range

Results Grid:

ColumnDescription
Entry IDLedger entry ID
ClientClient name
TypeOA / LOAN
DealAssociated deal
Original AmountEntry amount
AppliedAlready applied
AvailableRemaining balance
SelectCheckbox or amount input

Actions:

  • Select and add to worksheet
  • Specify amount to apply (partial or full)

Data Requirements

Client Ledger Table (client_ledger)

Field NameData TypeDescription
client_ledger_id (PK)SerialUnique identifier
client_id (FK)IntegerClient party
contracted_party_id (FK)IntegerContracted party (optional)
buyer_id (FK)IntegerBuyer (optional)
deal_id (FK)IntegerAssociated deal (optional)
uta_entity_id (FK)IntegerUTA entity
department_id (FK)IntegerDepartment
client_ledger_type_cdEnumOA, LOAN
client_ledger_status_cdEnumD, V, C
client_ledger_nameStringEntry description
client_ledger_amtDecimalOriginal amount
client_ledger_currency_cdStringCurrency code
client_ledger_start_dtDateStart date
client_ledger_end_dtDateEnd date
client_ledger_notesStringNotes
client_ledger_open_item_indBooleanHas open balance
client_ledger_payment_item_idIntegerSource payment item
posting_status_cdEnumU, P, X
posting_dtDateGL posting date

Cash Receipt Client Ledger Table (cash_receipt_client_ledger)

Field NameData TypeDescription
cash_receipt_client_ledger_id (PK)SerialUnique identifier
cash_receipt_worksheet_id (FK)IntegerWorksheet applying this entry
client_ledger_id (FK)IntegerClient ledger entry
deal_id (FK)IntegerDeal context
uta_entity_id (FK)IntegerUTA entity
department_id (FK)IntegerDepartment
client_id (FK)IntegerClient
cash_receipt_amt_appliedDecimalAmount being applied
reversal_of_ledger_idIntegerOriginal if reversal
reversal_reason_cdStringReason code

See Also

DocumentRelationship
Cash ManagementWorksheets apply client ledger entries
PaymentsOne-off payments sourced from client ledger

Gherkin Scenarios

Scenario: Create On-Account Entry

gherkin
Feature: Client Ledger Entry Creation

  Scenario: User creates an on-account entry for a client
    Given I am on the Client Ledger tab for "John Smith"
    
    When I click "Add New Entry"
    And I select type "On-Account"
    And I enter name "Overpayment from Studio A"
    And I enter amount 5000.00
    And I select currency "USD"
    And I click "Save"
    
    Then a new client ledger entry should be created
    And status should be "Draft"
    And open_item_ind should be true

Scenario: Apply Client Ledger to Worksheet

gherkin
Feature: Client Ledger Application

  Scenario: User applies on-account balance to cash worksheet
    Given Client "John Smith" has on-account balance of $5,000
    And I am on a cash receipt worksheet for "John Smith"
    
    When I click "Add On-Account"
    And I select the $5,000 on-account entry
    And I enter apply amount $2,000
    And I add to worksheet
    
    Then the worksheet should show $2,000 on-account application
    And the entry should still have $3,000 available until approved

Scenario: Worksheet Approval Reduces Balance

gherkin
Feature: Balance Reduction on Approval

  Scenario: Balance is reduced when worksheet is approved
    Given a worksheet with $2,000 applied from client ledger entry
    
    When the worksheet is approved
    
    Then the client ledger entry balance should be reduced by $2,000
    And if balance reaches zero, open_item_ind should be false

Scenario: Worksheet Return Restores Balance

gherkin
Feature: Balance Restoration on Return

  Scenario: Balance is restored when worksheet is returned
    Given a worksheet with $2,000 applied from client ledger entry was approved
    
    When the worksheet is returned
    
    Then a reversal record should be created
    And the client ledger entry balance should be restored by $2,000
    And open_item_ind should be true if balance > 0

Confidential. For internal use only.