# GetSalesPaymentTerm

## Overview

GetSalesPaymentTerm retrieves one payment-term definition with its schedule-line content and discount metadata.

## Business Rules

- Lookup by id performs an exact payment-term match.
- The query returns DRAFT, ACTIVE, and INACTIVE terms.

## Process Flow

```mermaid
flowchart TD
    A[Receive payment-term id] --> B[Query SalesPaymentTerm]
    B --> C{Found?}
    C -->|No| D[Return null]
    C -->|Yes| E[Return payment term]
```

## External Dependencies

- None

## Error Scenarios

- None (returns null when no matching sales payment term exists)

## Test Cases

- returns payment term when found
- returns inactive payment term when requested directly
- returns null when payment term is not found
