# outbound-shipment-detail

## Overview

Displays full details of a single outbound shipment (出庫) including header information and line items. Available actions vary by status.

## Screen Type

DetailView

### DetailView Details

#### Displayed Fields

The header info card is always shown. Below it, a tab switches between the line items (Lines / 明細) and the costing journal (Journal / 仕訳).

- **Header** (always visible)
  - Document Number (`docNumber`)
  - Status (`status`) — Badge: DRAFT (neutral), POSTED (success), CANCELLED (error)
  - Source — resolved from the lines' `sourceDocumentType` / `sourceDocumentId` (all lines of an outbound shipment share the same source); links to the source sales order
  - Issue Date (`effectiveDate`)
- **Lines tab** (明細) — line items table
  - Item
  - Storage Location
  - Quantity
- **Journal tab** (仕訳) — the costing journal(s) this shipment posted (empty until POSTED). Reached via `InventoryLedger` (`sourceType = OUTBOUND_SHIPMENT`) → `INVENTORY_LEDGER` journals. Each entry can be viewed as List (flat: Account / Description / Debit / Credit) or Voucher (debit/credit T-account) via a capsule toggle; the entry date and status sit in the card header.

#### Available Actions

| Action | Condition | Requires Input | Confirmation |
|---|---|---|---|
| Post / Settle | status is DRAFT | — | dialog |
| Cancel | status is DRAFT | — | dialog |
| Back | — | — | — |

Settling reduces on-hand AVAILABLE stock — see [settleOutboundShipment](../resolver/settleOutboundShipment.md). It does not advance the linked sales order's shipped status; reflecting fulfilment onto the order is a separate cross-module concern.

## Access Control

- [inventory-manager](../actor/inventory-manager.md)
