Skip to content

Statements

Executive Summary

Purpose & Scope

  • Generate and manage PDF statements for clients, deals, settlements, AR aging, and invoices
  • Scope includes: Client statements, settlement statements, deal statements, AR aging statements, invoice generation, S3 storage, statement history
  • Out of scope: Statement delivery/email, external integrations beyond S3

Objectives

  • Provide clients with accurate financial summaries for defined date ranges
  • Enable on-demand and batch statement generation
  • Track all generated statements with full audit history
  • Support multiple statement formats based on use case

Process Overview

Statement Generation Flow

mermaid
flowchart TD
    User[User Request] --> Type{Statement Type}
    Type --> CS[Client Statement]
    Type --> SS[Settlement Statement]
    Type --> DS[Deal Statement]
    Type --> AR[AR Aging Statement]
    Type --> INV[Invoice]
    
    CS --> Agg[Data Aggregation]
    SS --> Agg
    DS --> Agg
    AR --> Agg
    INV --> Agg
    
    Agg --> PDF[PDF Generation]
    PDF --> S3[Upload to S3]
    S3 --> DB[Record in Database]
    DB --> Download[Available for Download]

Figure 1: Statement Generation Flow

Statement Types

Client Statement

Purpose: Summary of all transactions for a client within a date range.

FieldDescription
ClientParty receiving the statement
Date RangeFrom/To dates for transactions
CurrencyStatement currency
TransactionsList of payment items with gross, commission, net
TotalsTotal gross, commission, and net amounts

Use Case: Regular reporting to clients on their account activity.


Settlement Statement

Purpose: Summary of settlements processed for a client.

FieldDescription
ClientParty receiving settlements
Date RangePeriod covered
EngagementsList of deals/venues with settlement amounts
TotalsGuarantee, overage, backout, net gross, commission due

Use Case: Showing clients how their earnings were settled.


Deal Statement

Purpose: Detailed breakdown of a specific deal's financials.

FieldDescription
DealDeal reference and name
Revenue ItemsAll revenue items for the deal
PayeesAllocation percentages for each participant
TotalsGross, commission, net by payee

Use Case: Deal-specific financial reporting.


AR Aging Statement

Purpose: Open receivables grouped by aging buckets.

FieldDescription
Client (optional)Filter by specific client
As-Of DateDate to calculate aging from
Aging BucketsCurrent, 30, 60, 90, 120+ days
Line ItemsBilling items with invoice, due date, balance, age
SummaryTotals by aging bucket

Use Case: Collections prioritization and client AR health check.


Invoice

Purpose: Formal invoice document for billing items.

FieldDescription
PartyClient or buyer being invoiced
Target TypeCLIENT or BUYER
Billing ItemsSelected items to include
UK Entity FlagDifferent format for UK regulations

Use Case: Formal billing documentation.

Core Rules & Requirements

Statement Reference Format

TypeFormatExample
Client StatementCS-{timestamp}-{uuid}CS-1736776800000-A1B2C3D4
Settlement StatementSS-{timestamp}-{uuid}SS-1736776800000-E5F6G7H8
Deal StatementDS-{timestamp}-{uuid}DS-1736776800000-I9J0K1L2
AR AgingAR-{timestamp}-{uuid}AR-1736776800000-M3N4O5P6
InvoiceINV-{timestamp}-{uuid}INV-1736776800000-Q7R8S9T0

Generation Status Lifecycle

StatusCodeDescription
PendingPENDINGRequest received, not started
GeneratingGENERATINGPDF creation in progress
CompletedCOMPLETEDSuccessfully generated and stored
FailedFAILEDError during generation

Storage Rules

  • All statements are stored in S3 upon successful generation
  • Database record created with S3 bucket/key reference
  • Metadata (totals, counts) stored as JSON for quick retrieval
  • Statements are immutable once generated

Data Filters

Statement TypeRequired FiltersOptional Filters
Client StatementclientId, dateFrom, dateTocurrencyCd, excludedPaymentItemIds
Settlement StatementclientId, dateFrom, dateTocurrencyCd
Deal StatementdealId-
AR Aging-clientId, asOfDate, openItemsOnly
InvoicepartyId, targetType, billingItemIdsisUKEntity

User Interface Specifications

Statement Generation Screen

Fields:

  • Statement Type (dropdown): Client, Settlement, Deal, AR Aging, Invoice
  • Client (autocomplete): For client/settlement statements
  • Deal (autocomplete): For deal statements
  • Date From / Date To: Date range picker
  • Currency (dropdown): USD, GBP, EUR, etc.

Actions:

  • Preview (show data without generating PDF)
  • Generate (create PDF and store)

Statement History Screen

Search Criteria:

  • Client
  • Statement Type
  • Date Range (generated date)

Results Grid:

ColumnDescription
Statement RefUnique identifier link
TypeCLIENT_STATEMENT, etc.
ClientParty name
Date RangeFrom - To
Generated ByUser who created
Generated DateTimestamp
File SizeSize in KB
ActionsDownload, View

Statement Preview

Purpose: View transactions before generating PDF.

Displays:

  • Client information
  • Transaction list (searchable/sortable)
  • Totals summary
  • "Generate PDF" button

Data Requirements

All tables have tracking for creation, last update, and user.

Generated Statement Table (generated_statement)

Field NameData TypeDescription
generated_statement_id (PK)SerialUnique identifier
statement_type_cdStringCLIENT_STATEMENT, SETTLEMENT_STATEMENT, etc.
statement_refStringUnique reference shown on PDF
client_id (FK)IntegerParty this statement is for
date_fromDateStart of covered period
date_toDateEnd of covered period
currency_cdStringStatement currency
s3_bucketStringS3 bucket name
s3_keyStringS3 object key
file_pathStringLocal file path (dev only)
file_nameStringOriginal filename
file_size_bytesIntegerFile size
generation_status_cdEnumPENDING, GENERATING, COMPLETED, FAILED
error_messageTextError details if failed
metadataJSONBFlexible data (totals, counts, etc.)
generated_byStringUser who generated
generated_dtDateTimeGeneration timestamp

Statement Type Codes

CodeDescription
CLIENT_STATEMENTClient transaction summary
SETTLEMENT_STATEMENTSettlement summary
DEAL_STATEMENTDeal financial breakdown
AR_STATEMENTAR aging report
INVOICEFormal invoice

See Also

DocumentRelationship
Cash ManagementPayment items included in statements
Billing ItemsSource for invoice line items
AR AgingDedicated AR aging requirements

Gherkin Scenarios

Scenario: Generate Client Statement

gherkin
Feature: Client Statement Generation

  Scenario: User generates a client statement for a date range
    Given I am a Client Accounting user
    And Client "John Smith" has 5 payment items posted between 2026-01-01 and 2026-01-31
    
    When I select statement type "Client Statement"
    And I select client "John Smith"
    And I set date range to 2026-01-01 through 2026-01-31
    And I click "Generate"
    
    Then a PDF should be created
    And the statement should contain 5 transactions
    And the statement should be stored in S3
    And a record should be created in generated_statement table
    And the statement should be available for download

Scenario: Preview Before Generate

gherkin
Feature: Statement Preview

  Scenario: User previews transactions before generating statement
    Given Client "Jane Doe" has transactions in the selected date range
    
    When I click "Preview"
    
    Then I should see a list of transactions
    And I should see the calculated totals
    And I should NOT yet have a PDF generated

Scenario: Download Historical Statement

gherkin
Feature: Statement History

  Scenario: User downloads a previously generated statement
    Given a statement with ref "CS-1736776800000-ABC12345" exists
    
    When I search for statements for Client "John Smith"
    And I click "Download" on the statement row
    
    Then the PDF should be retrieved from S3
    And the file should download to my browser

Scenario: AR Aging for All Clients

gherkin
Feature: AR Aging Statement

  Scenario: Generate AR aging for entire portfolio
    Given there are open billing items across multiple clients
    
    When I select statement type "AR Aging"
    And I leave client filter empty
    And I set as-of date to today
    And I click "Generate"
    
    Then a PDF should show all open receivables
    And receivables should be grouped by aging bucket
    And totals should be summarized by bucket

Confidential. For internal use only.