# GetSupplierProfile

## Overview

GetSupplierProfile retrieves the purchase-owned supplier procurement profile for one company and supplier, including the default purchase payment term if one is configured.

## Business Rules

- Input lookup is `companyId + supplierId`
- Returns the supplier profile for any persisted state because the model is standard, not lifecycle-driven
- Returns the embedded default payment term reference when configured
- Returns null when no purchase profile exists for the supplier in the company

## Process Flow

```mermaid
flowchart TD
    A[Receive companyId + supplierId] --> B[Select SupplierProfile by company and supplier]
    B --> C{Profile found?}
    C -->|Yes| D[Return supplier profile]
    C -->|No| E[Return null]
```

## External Dependencies

- None

## Error Scenarios

- **SUPPLIER_PROFILE_NOT_FOUND**: No supplier profile exists for the given company and supplier; caller receives null

## Test Cases

- returns supplier profile when found
- returns default payment term reference when configured
- returns null when supplier profile does not exist
