> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# General Ledger User Guide

> Version: 1.0.0 Last Updated: 2025-11-26

**Version:** 1.0.0\
**Last Updated:** 2025-11-26

This guide provides comprehensive instructions for using the General Ledger (GL) module within the Encore Health OS Finance & Accounting system.

***

## Table of Contents

1. [Overview](#overview)
2. [Journal Entry Management](#journal-entry-management)
3. [Recurring Entries](#recurring-entries)
4. [Trial Balance](#trial-balance)
5. [Period Controls](#period-controls)
6. [Best Practices](#best-practices)
7. [Troubleshooting](#troubleshooting)

***

## Overview

### What is the General Ledger?

The General Ledger (GL) is the core financial transaction engine that records all financial transactions using double-entry accounting principles. Every transaction affects at least two accounts, with total debits always equaling total credits.

### Key Features

* **Double-Entry Accounting**: Every transaction is balanced with equal debits and credits
* **Fund Accounting**: Track funds with donor restrictions and purpose restrictions
* **Period Controls**: Prevent posting to closed fiscal periods
* **Immutable Transactions**: Posted entries cannot be modified, only reversed
* **Audit Trail**: Complete tracking of who created/posted/reversed entries
* **Recurring Entries**: Automate repetitive monthly/quarterly/annual transactions

### Access Requirements

* **View Journal Entries**: All organization users
* **Create/Edit Draft Entries**: Finance staff and administrators
* **Post Entries**: Finance administrators only
* **Close Periods**: Finance administrators only

***

## Journal Entry Management

### Creating a Draft Journal Entry

1. **Navigate to Journal Entries**
   * Go to **Finance → Journal Entries**
   * Click **+ New Entry** button

2. **Enter Header Information**
   * **Transaction Date**: The date the transaction occurred
   * **Posting Date**: The date to post to the GL (defaults to today)
   * **Period**: Select the fiscal period (must be open)
   * **Description**: Brief summary of the transaction
   * **Source Type**: Manual, System, Import, etc.
   * **Notes**: Optional detailed explanation

3. **Add Journal Entry Lines**
   * Click **+ Add Line**
   * **Account**: Select GL account from Chart of Accounts
   * **Debit**: Enter debit amount (or 0)
   * **Credit**: Enter credit amount (or 0)
   * **Fund**: Optional fund assignment
   * **Department**: Optional department assignment
   * **Program**: Optional program assignment
   * **Description**: Line-level description

4. **Balance Validation**
   * The form displays running totals of debits and credits
   * **Save as Draft** button enables when debits = credits
   * Unbalanced entries cannot be saved

5. **Save the Entry**
   * Click **Save as Draft**
   * Entry status: `draft`
   * Entry can be edited or deleted while in draft status

### Example: Recording a Cash Sale

**Scenario**: Received \$500 cash for services rendered.

| Account                | Debit | Credit | Description       |
| ---------------------- | ----- | ------ | ----------------- |
| 1000 - Cash            | \$500 | -      | Cash received     |
| 4000 - Service Revenue | -     | \$500  | Services rendered |

**Total Debits**: $500   **Total Credits**: $500\
**Status**: Balanced ✓

### Editing Draft Entries

1. Navigate to **Finance → Journal Entries**
2. Click on the draft entry to open
3. Modify header or line information
4. Click **Update Entry**

**Note**: Only draft or pending entries can be edited.

### Posting a Journal Entry

**What Posting Does:**

* Changes entry status from `draft` to `posted`
* Updates account balances in `fa_account_balances`
* Stamps `posted_at` and `posted_by`
* Makes entry immutable (cannot be edited/deleted)

**Steps:**

1. Open the draft entry
2. Review all details for accuracy
3. Click **Post Entry** button
4. Confirm the posting action
5. System validates:
   * Entry is balanced
   * Period is open
   * All required fields present
6. Entry status changes to `posted`

### Reversing a Posted Entry

**When to Reverse:**

* Correct an error in a posted entry
* Cancel a transaction
* Adjust prior period entries

**Reversal Process:**

1. Open the posted entry
2. Click **Reverse Entry** button
3. Select **Reversal Period** (current or next period)
4. Enter **Reversal Description**
5. Click **Confirm Reversal**

**What Happens:**

* System creates new journal entry with opposite debits/credits
* New entry is automatically posted
* Original entry status changes to `reversed`
* Both entries link via `reversal_of_entry_id` and `reversed_by_entry_id`

**Example Reversal:**

**Original Entry:**

| Account             | Debit   | Credit  |
| ------------------- | ------- | ------- |
| 5000 - Rent Expense | \$1,000 | -       |
| 1000 - Cash         | -       | \$1,000 |

**Reversal Entry:**

| Account             | Debit   | Credit  |
| ------------------- | ------- | ------- |
| 1000 - Cash         | \$1,000 | -       |
| 5000 - Rent Expense | -       | \$1,000 |

### Deleting Entries

* **Draft Entries**: Can be deleted via **Delete Entry** button
* **Posted Entries**: Cannot be deleted (use reversal instead)
* **Reversed Entries**: Cannot be deleted

***

## Recurring Entries

### What are Recurring Entries?

Recurring entries are templates for transactions that repeat on a regular schedule (monthly rent, quarterly insurance, annual dues, etc.).

### Creating a Recurring Entry Template

1. **Navigate to Recurring Entries**
   * Go to **Finance → Recurring Entries**
   * Click **+ New Recurring Entry**

2. **Configure Template**
   * **Template Name**: Descriptive name (e.g., "Monthly Rent Payment")
   * **Description**: Optional details
   * **Frequency**: Monthly, Quarterly, Annually
   * **Start Date**: When to begin generating entries
   * **End Date**: Optional expiration date
   * **Is Active**: Enable/disable template

3. **Define Template Lines**
   * Add journal entry lines as you would for a manual entry
   * Lines must be balanced (debits = credits)
   * Account assignments are saved in template

4. **Save Template**
   * Click **Create Template**
   * Template is now active and ready to generate entries

### Example Recurring Entry: Monthly Rent

**Template Name**: Monthly Office Rent\
**Frequency**: Monthly\
**Start Date**: 2025-01-01

| Account             | Debit   | Credit  |
| ------------------- | ------- | ------- |
| 5100 - Rent Expense | \$2,000 | -       |
| 1000 - Cash         | -       | \$2,000 |

### Generating Entries from Templates

**Automated Generation** (if enabled):

* System checks `next_generation_date` for each active template
* Generates draft journal entry automatically
* Updates `last_generated_date` and calculates next date

**Manual Generation**:

1. Open recurring entry template
2. Click **Generate Entry Now**
3. Select target period
4. Review generated draft entry
5. Post entry when ready

### Managing Recurring Entries

* **Edit Template**: Modify frequency, dates, or line items
* **Deactivate Template**: Set `is_active = false` to stop generation
* **Delete Template**: Remove template (does not affect previously generated entries)

***

## Trial Balance

### What is a Trial Balance?

A trial balance is a report showing ending balances for all GL accounts in a given period. It verifies that total debits equal total credits.

### Running a Trial Balance

1. **Navigate to Trial Balance**
   * Go to **Finance → Trial Balance**

2. **Select Filters**
   * **Fiscal Period**: Required (e.g., "Period 3 - March 2025")
   * **Fund**: Optional filter by specific fund
   * **Show Inactive Accounts**: Toggle to include inactive accounts

3. **View Results**
   * **Account Number**: GL account number
   * **Account Name**: GL account name
   * **Account Type**: Asset, Liability, Equity, Revenue, Expense
   * **Fund**: Fund assignment (if applicable)
   * **Beginning Balance**: Balance at start of period
   * **Period Debits**: Total debits during period
   * **Period Credits**: Total credits during period
   * **Ending Balance**: Calculated ending balance

4. **Verify Balance**
   * Total debits should equal total credits
   * If unbalanced, investigate journal entry errors

### Interpreting Trial Balance Results

**Normal Balances by Account Type:**

| Account Type | Normal Balance | Increases With | Decreases With |
| ------------ | -------------- | -------------- | -------------- |
| Asset        | Debit          | Debit          | Credit         |
| Liability    | Credit         | Credit         | Debit          |
| Equity       | Credit         | Credit         | Debit          |
| Revenue      | Credit         | Credit         | Debit          |
| Expense      | Debit          | Debit          | Credit         |

### Exporting Trial Balance

* Click **Export** button (future feature)
* Download as CSV or PDF
* Use for external reporting or analysis

***

## Period Controls

### Fiscal Periods Overview

The fiscal year is divided into periods (typically 12 monthly periods). Each period has a status:

* **Open**: Journal entries can be posted
* **Closed**: Journal entries cannot be posted (period is locked)
* **Adjusting**: Special period for year-end adjustments

### Closing a Fiscal Period

**Prerequisites:**

* All entries for the period are posted
* Reconciliations are complete
* Management approval obtained

**Steps:**

1. Navigate to **Finance → Fiscal Periods**
2. Select period to close
3. Click **Close Period**
4. Enter closing notes
5. Confirm closure

**Effects of Closing:**

* Status changes to `closed`
* `closed_at` and `closed_by` timestamps recorded
* No new entries can be posted to this period
* Existing posted entries remain unchanged

### Reopening a Period

**When to Reopen:**

* Discovered error requiring correction
* Late transactions need recording
* Year-end adjustments

**Steps:**

1. Navigate to **Finance → Fiscal Periods**
2. Select closed period
3. Click **Reopen Period**
4. Enter reason for reopening
5. Confirm reopening

**Best Practice**: Minimize period reopening. Use reversing entries in current period when possible.

***

## Best Practices

### Month-End Close Procedures

1. **Review Draft Entries**
   * Post or delete all draft entries
   * Ensure no entries are stuck in draft status

2. **Reconcile Bank Accounts**
   * Compare GL cash balance to bank statements
   * Record any missing transactions
   * Post bank fees, interest, etc.

3. **Review Account Balances**
   * Run trial balance for the period
   * Verify debits = credits
   * Investigate unusual balances

4. **Record Accruals**
   * Accrue revenue earned but not yet invoiced
   * Accrue expenses incurred but not yet paid
   * Prepaid expenses and deferred revenue

5. **Close the Period**
   * Follow period closing steps above
   * Document any issues or anomalies

### Data Entry Standards

* **Descriptive Entries**: Write clear descriptions that explain the "why"
* **Consistent Naming**: Use standard terms for common transactions
* **Attach Documentation**: Link source documents when possible
* **Review Before Posting**: Double-check amounts and accounts
* **Use Memos/Notes**: Add context for complex entries

### Security & Access Control

* **Segregation of Duties**: Separate entry creation from posting approval
* **Role-Based Access**: Grant minimum necessary permissions
* **Audit Trail**: Review `created_by` and `posted_by` regularly
* **Period Locks**: Close periods promptly to prevent backdated entries

***

## Troubleshooting

### Common Errors

#### "Entry is not balanced"

**Cause**: Total debits ≠ Total credits

**Solution**:

* Recalculate line amounts
* Check for missing lines
* Verify debit/credit sides are correct

#### "Cannot post to closed period"

**Cause**: Selected fiscal period is closed

**Solution**:

* Check period status in Fiscal Periods
* Reopen period if correction is required
* Or post reversal/adjustment to current period

#### "Entry has already been reversed"

**Cause**: Attempting to reverse an entry that was already reversed

**Solution**:

* Check entry status (should show `reversed`)
* Review `reversed_by_entry_id` to find reversal entry
* Create new entry if additional adjustment needed

#### "Account does not allow posting"

**Cause**: Selected account has `allows_posting = false` (control account)

**Solution**:

* Use a different account (child account, not parent)
* Check Chart of Accounts for posting-enabled accounts

#### "Invalid fund assignment"

**Cause**: Account requires fund but none selected, or fund is inactive

**Solution**:

* Select active fund for the line
* Check account settings for `requires_fund` flag

### Performance Issues

**Slow Trial Balance Queries**:

* Use fund filter to limit results
* Balances are materialized, so queries should be fast
* Contact system admin if performance degrades

**Timeout on Large Journal Entry Posting**:

* Break large entries into smaller batches
* System limit is typically 1000 lines per entry
* Consider bulk import tools for high volume

### Getting Help

* **Finance Department**: For policy and procedural questions
* **System Administrator**: For technical issues or access problems
* **Documentation**: Refer to [FA-02 Specification](../../specs/fa/specs/FA-02-general-ledger.md)
* **Support**: Email [support@encoreos.io](mailto:support@encoreos.io) or call 1-800-XXX-XXXX

***

## Keyboard Shortcuts

| Action     | Shortcut          |
| ---------- | ----------------- |
| New Entry  | `Ctrl+N` (future) |
| Save Entry | `Ctrl+S` (future) |
| Add Line   | `Ctrl+L` (future) |
| Post Entry | `Ctrl+P` (future) |

***

## Appendix: GL Transaction Examples

### Example 1: Cash Purchase of Supplies

**Transaction**: Purchased office supplies for \$150 cash.

| Account                        | Debit | Credit |
| ------------------------------ | ----- | ------ |
| 5200 - Office Supplies Expense | \$150 | -      |
| 1000 - Cash                    | -     | \$150  |

### Example 2: Accounts Receivable Collection

**Transaction**: Collected \$2,500 from customer on account.

| Account                    | Debit   | Credit  |
| -------------------------- | ------- | ------- |
| 1000 - Cash                | \$2,500 | -       |
| 1200 - Accounts Receivable | -       | \$2,500 |

### Example 3: Payroll Accrual

**Transaction**: Accrued \$8,000 in wages for employees (not yet paid).

| Account                | Debit   | Credit  |
| ---------------------- | ------- | ------- |
| 5300 - Payroll Expense | \$8,000 | -       |
| 2100 - Wages Payable   | -       | \$8,000 |

### Example 4: Loan Payment (Principal + Interest)

**Transaction**: Made loan payment of $1,200 ($1,000 principal, \$200 interest).

| Account                 | Debit   | Credit  |
| ----------------------- | ------- | ------- |
| 2200 - Loan Payable     | \$1,000 | -       |
| 5400 - Interest Expense | \$200   | -       |
| 1000 - Cash             | -       | \$1,200 |

***

**Maintained by:** Finance & Accounting Team\
**Questions?** Contact [finance@encoreos.io](mailto:finance@encoreos.io)
