# GetSalesCreditNote

## Overview

GetSalesCreditNote retrieves one credit note with correction-line detail and linked invoice context.

## Business Rules

- Lookup by id performs an exact credit-note match.
- The query returns DRAFT and ISSUED credit notes.

## Process Flow

```mermaid
flowchart TD
    A[Receive credit-note id] --> B[Query SalesCreditNote and lines]
    B --> C{Found?}
    C -->|No| D[Return null]
    C -->|Yes| E[Return credit note]
```

## External Dependencies

- None

## Error Scenarios

- None (returns null when no matching sales credit note exists)

## Test Cases

- returns credit note when found by id
- returns issued credit note with correction lines
- returns null when credit note is not found
