# GetGoodsIssue

## Overview

GetGoodsIssue retrieves a single goods issue InventoryExecution by ID, including all associated InventoryExecutionLine rows.

## Business Rules

- Lookup key is goods issue InventoryExecution id
- Always filters InventoryExecution by executionType = GOODS_ISSUE
- Returns the full InventoryExecution record with nested InventoryExecutionLine records
- Returns null with an empty line list when no GOODS_ISSUE execution matches the given ID

## Process Flow

```mermaid
flowchart TD
    A[Receive goods issue execution id] --> B[Select InventoryExecution by id and GOODS_ISSUE type]
    B --> C{Goods issue found?}
    C -->|No| D[Return null and empty lines]
    C -->|Yes| E[Select InventoryExecutionLine rows]
    E --> F[Return execution and lines]
```

## External Dependencies

- None

## Error Scenarios

- Returns null if the goods issue execution is not found

## Test Cases

- returns goods issue execution with lines when found
- returns null when goods issue execution does not exist
- returns goods issue execution with empty lines when no lines exist
