# GetAccountingPeriod

## Overview

GetAccountingPeriod retrieves a single accounting period record by id. The period record includes the period name, companyId, fiscalYearId, start date, end date, period type, and current status. This serves as the core period lookup for posting validation, period lifecycle management, and close workflows.

## Business Rules

- Accepts a single lookup parameter: `{ id }`
- Returns the full accounting period record including all fields (id, companyId, fiscalYearId, periodName, startDate, endDate, periodType, status, timestamps)
- Returns null if no matching accounting period is found
- Lookup is an exact match on id

## Process Flow

```mermaid
flowchart TD
    A[Receive input with id] --> B[SELECT from AccountingPeriod where id = input.id]
    B --> C{Period found?}
    C -->|Yes| D[Return accounting period record]
    C -->|No| E[Return null]
```

## External Dependencies

- None

## Error Scenarios

- **ACCOUNTING_PERIOD_NOT_FOUND**: Referenced accounting period does not exist

## Test Cases

- returns accounting period when found by id
- returns null when not found
