# 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, journal type, reference number, status, accounting period, description, source document reference) and the full list of journal lines (GL account, debit/credit amounts, currency, exchange rate, functional currency amount, line description). This is the primary query for viewing journal entry details, audit 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, currency details, 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

- **JOURNAL_ENTRY_NOT_FOUND**: No journal entry matches the given id — caller receives null

## Test Cases

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