# SalesCreditNoteLine

## Description

SalesCreditNoteLine stores the specific invoice-line quantity or amount being corrected on a credit note. It preserves correction reason, tax basis, and original billing reference so downstream posting remains deterministic.

## Domain Model Definitions

### Model type

Standard

### Command Definitions

- [createSalesCreditNote](../commands/CreateSalesCreditNote.md) - Create initial credit-note lines against issued invoice lines.
- [updateSalesCreditNote](../commands/UpdateSalesCreditNote.md) - Revise draft correction quantities or amounts before issue.
- [issueSalesCreditNote](../commands/IssueSalesCreditNote.md) - Freeze the final correction baseline at issue time.

### Query Definitions

- [getSalesCreditNote](../queries/GetSalesCreditNote.md) - Return line-level correction details for one credit note.
- [listSalesCreditNotesByInvoice](../queries/ListSalesCreditNotesByInvoice.md) - Expose the correction history attached to one invoice.

### Models

- SalesCreditNoteLine

### Invariants

- Every credit-note line belongs to exactly one credit note and references one issued invoice line.
- Credited quantity or amount must be greater than zero.
- The line preserves the original invoice-line identity and correction reason so later downstream posting does not depend on mutable upstream data.

### Relationships

- **Belongs To SalesCreditNote**: `salesCreditNoteId` ties the line to its parent correction document.
- **References SalesInvoiceLine**: `salesInvoiceLineId` identifies the billed evidence being corrected.
