# SupplierProfile

## Description

SupplierProfile is the purchase-owned extension of a supplier partner inside one company. It captures procurement defaults that are not part of general business-partner master data, starting with the default purchase payment term used when a new draft purchase order is created for that supplier.

This model resolves ownership ambiguity between purchase and business-partner: business-partner owns the partner identity and role classification, while purchase owns supplier-facing procurement defaults keyed by `companyId + supplierPartnerId`.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- [setSupplierDefaultPurchasePaymentTerm](../commands/SetSupplierDefaultPurchasePaymentTerm.md) - Create or update the supplier procurement profile and assign its default payment term

### Query Definitions

- [getSupplierProfile](../queries/GetSupplierProfile.md) - Retrieve the company-scoped supplier procurement profile with its default payment term

### Models

- SupplierProfile

### Invariants

- A supplier has at most one purchase profile per company
- A supplier profile can exist only for a partner that has the `SUPPLIER` role
- A default purchase payment term, when present, must belong to the same company as the supplier profile
- A deactivated purchase payment term cannot remain the default for new draft purchase orders until it is replaced or cleared

### Relationships

- **Belongs To BusinessPartner**: Each supplier profile extends one [BusinessPartner](../../../business-partner/docs/models/BusinessPartner.md) record used as the supplier reference
- **References PurchasePaymentTerm**: The profile may point to one default [PurchasePaymentTerm](./PurchasePaymentTerm.md) for draft order defaulting
