Skip to main content

Overview

The balance sheet presents a company’s financial position at a specific point in time, showing assets, liabilities, and equity. It implements the fundamental accounting equation: Assets = Liabilities + Equity.
Balance sheets are generated using BalanceSheetService in packages/core/src/reporting/BalanceSheetService.ts, following ASC 210 standards.

Report Structure

Sections

The balance sheet is organized into five main sections per ASC 210:
Current Assets
  • Cash and cash equivalents
  • Accounts receivable
  • Inventory
  • Prepaid expenses
  • Other current assets
Non-Current Assets
  • Property, plant, and equipment
  • Intangible assets
  • Long-term investments
  • Other non-current assets

Line Items

Each line item includes:
interface BalanceSheetLineItem {
  accountId?: AccountId              // null for subtotals/totals
  accountNumber?: string             // for display and sorting
  description: string                // account name or label
  currentAmount: MonetaryAmount      // current period balance
  comparativeAmount?: MonetaryAmount // prior period (if requested)
  variance?: MonetaryAmount          // absolute variance
  variancePercentage?: number        // variance as percentage
  isSubtotal: boolean
  indentLevel: number                // for hierarchical display
  style: "Normal" | "Subtotal" | "Total" | "Header"
}

Key Totals

  • Total Assets: Current Assets + Non-Current Assets
  • Total Liabilities: Current Liabilities + Non-Current Liabilities
  • Total Equity: Sum of all equity accounts
  • Total Liabilities and Equity: Must equal Total Assets

Generating a Balance Sheet

1

Select company and date

Choose the company and the as-of date for the balance sheet. This represents the financial position at the end of that specific day.
2

Configure comparative period (optional)

Optionally select a comparative date (e.g., prior year-end) to show period-over-period changes with variance analysis.
3

Set display options

  • Include zero balances: Show or hide accounts with zero balances
  • Show account numbers: Display account codes for reference
  • Indentation level: Control hierarchical display depth
4

Generate and validate

The service generates the report and automatically validates that Assets = Liabilities + Equity. Any imbalance raises a BalanceSheetNotBalancedError.

Service Methods

generateBalanceSheet

Generates a complete balance sheet report.
interface GenerateBalanceSheetInput {
  companyId: CompanyId
  asOfDate: LocalDate
  includeZeroBalances?: boolean      // default: false
  comparativeDate?: LocalDate        // optional prior period
}

function generateBalanceSheet(
  input: GenerateBalanceSheetInput
): Effect<BalanceSheetReport, CompanyNotFoundError | BalanceSheetNotBalancedError>
Returns: BalanceSheetReport with all sections, line items, and totals Errors:
  • CompanyNotFoundError: Company does not exist
  • BalanceSheetNotBalancedError: Assets ≠ Liabilities + Equity

Report Validation

The balance sheet implements strict validation per ASC 210:

Balancing Equation

totalAssets === totalLiabilities + totalEquity
If this fundamental equation doesn’t hold, the report generation fails with detailed error information showing:
  • Total Assets amount
  • Total Liabilities amount
  • Total Equity amount
  • The discrepancy
A balance sheet that doesn’t balance indicates serious accounting data issues and must be investigated immediately.

Comparative Analysis

When a comparative date is provided, the report includes:

Variance Columns

  • Absolute Variance: Current amount - Comparative amount
  • Percentage Variance: (Variance / Comparative amount) × 100

Variance Analysis Features

// Check if variance is positive (increase)
lineItem.hasPositiveVariance

// Check if variance is negative (decrease)
lineItem.hasNegativeVariance

Account Classification

Accounts are classified into sections based on AccountCategory:

Current vs Non-Current Assets

  • Current Assets: CurrentAsset category
  • Non-Current Assets: NonCurrentAsset, FixedAsset, IntangibleAsset categories

Current vs Non-Current Liabilities

  • Current Liabilities: CurrentLiability category
  • Non-Current Liabilities: NonCurrentLiability category

Equity

  • Contributed Capital: ContributedCapital category
  • Retained Earnings: RetainedEarnings category
  • Other Comprehensive Income: OtherComprehensiveIncome category
  • Treasury Stock: TreasuryStock category (contra-equity)

UI Workflow

  1. Navigate to ReportsBalance Sheet
  2. Select the company
  3. Choose the As-of Date (e.g., December 31, 2024)
  4. Click Generate Report
  5. Review the financial position:
    • Current and non-current assets
    • Current and non-current liabilities
    • Equity components
  6. Verify Total Assets equals Total Liabilities and Equity
  7. Export to PDF or Excel

Report Features

Section Helpers

The BalanceSheetReport class provides convenient methods:
// Get all sections as array
report.sections

// Get asset sections only
report.assetSections  // [currentAssets, nonCurrentAssets]

// Get liability sections only
report.liabilitySections  // [currentLiabilities, nonCurrentLiabilities]

// Total account count
report.totalAccountCount

Balance Checking

// Check if balanced
report.isBalanced

// Get out-of-balance amount
report.outOfBalanceAmount  // Should be zero

Export Formats

Balance sheets support multiple export formats:
  • PDF: Professional formatted report with company header
  • Excel: Multi-sheet workbook with formulas and formatting
  • CSV: Raw data for custom analysis
  • JSON: Structured data for API integration

Best Practices

  1. Monthly Close: Generate balance sheets at month-end to track financial position trends
  2. Comparative Reporting: Always include prior period comparison for meaningful analysis
  3. Account Organization: Maintain proper account categorization for accurate section classification
  4. Regular Validation: Verify the balance sheet equation holds before closing periods
  5. Zero Balance Exclusion: Exclude zero-balance accounts for cleaner presentation

Common Issues

IssueCauseResolution
Balance sheet doesn’t balanceIncomplete journal entriesReview trial balance first, verify all entries have balanced debits/credits
Accounts in wrong sectionIncorrect account categoryUpdate account’s category in chart of accounts
Missing accountsZero balance + excludedEnable “Include zero balances” option
Comparative period errorInvalid comparative dateEnsure comparative date is before as-of date
The balance sheet is typically generated after the trial balance to ensure all accounts are balanced before sectional classification.

Build docs developers (and LLMs) love