# GetFiscalYear

## Overview

GetFiscalYear retrieves a single fiscal year record by id. The fiscal year contains the year name, companyId, start date, end date, and status. This serves as the core fiscal year lookup for period management, year-end close workflows, and calendar structure validation.

## Business Rules

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

## Process Flow

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

## External Dependencies

- None

## Error Scenarios

- **FISCAL_YEAR_NOT_FOUND**: Referenced fiscal year does not exist or does not belong to the specified company

## Test Cases

- returns fiscal year when found by id
- returns null when not found
