# GetJournalEntry

## Overview

GetJournalEntry retrieves a single journal entry record by id, including all associated journal lines. The journal entry record contains the header fields (entry date, status, accounting period, description, source document type, and source document ID) and the full list of journal lines (GL account, debit/credit amounts, line description). This is the primary query for viewing journal entry details, review, and reversal workflows.

## Business Rules

- Accepts a single lookup parameter: `{ id }`
- Returns the full journal entry record including all header fields and all associated journal lines
- Journal lines include account references, debit and credit amounts, and line descriptions
- Returns null if no matching journal entry is found
- Lookup is an exact match on id

## Process Flow

```mermaid
flowchart TD
    A[Receive input with id] --> B[SELECT from JournalEntry where id = input.id]
    B --> C{Journal entry found?}
    C -->|Yes| D[Load all associated JournalLine records]
    D --> E[Return journal entry with lines]
    C -->|No| F[Return null]
```

## External Dependencies

- None

## Error Scenarios

- None

## Test Cases

- returns journal entry with journal lines when found by id
- returns null with empty journal lines when not found
