# ListPurchaseOrderLinesForMatching

## Overview

ListPurchaseOrderLinesForMatching returns purchase order line attributes needed for supplier invoice matching. It is the purchase-owned boundary query used by AP matching logic so account-payable does not query the PurchaseOrderLine table or carry its commercial fields directly.

The query returns one row per requested purchase-order line ID, exposing the owning purchase order ID, ordered quantity, unit price, unit of measure, and whether the line requires a physical goods receipt.

## Business Rules

- Returns one row per existing requested purchase-order line ID
- Each row exposes purchaseOrderId, quantity, unitPrice, unitId, and requiresPhysicalReceipt
- Unknown purchase-order line IDs are omitted from the result

## Process Flow

```mermaid
flowchart TD
    A[Receive purchase order line IDs] --> B{Any line IDs?}
    B -->|No| C[Return empty list]
    B -->|Yes| D[Select matching purchase order lines]
    D --> E[Return purchase order line attributes]
```

## External Dependencies

- None

## Error Scenarios

None. Unknown purchase-order line IDs are omitted and an empty input returns an empty list.

## Test Cases

- lists purchase order line attributes for matching
- returns empty list without querying when no purchase order line IDs are provided
