Files
vmall/openspec/changes/fulfillment-invoices/specs/shipment/spec.md
T

24 lines
1.0 KiB
Markdown

# Spec delta: shipment
## ADDED Requirements
### Requirement: Shipment creation
Merchants SHALL create shipments (发货单) for their own orders in `paid` or `fulfilling` status, specifying carrier, tracking_no and per-item quantities.
#### Scenario: partial shipment
- **WHEN** an order has 3 units of item X and a shipment covers 2
- **THEN** a later shipment may cover the remaining 1; requesting more than the remainder returns 400
#### Scenario: status propagation
- **WHEN** the first shipment is created for a paid order
- **THEN** the order becomes `fulfilling`
- **WHEN** all ordered quantities are covered by shipped shipments
- **THEN** the order becomes `shipped`
### Requirement: Delivery confirmation
Customers SHALL confirm delivery of their own shipments; when every shipment of an order is delivered the order becomes `completed`.
#### Scenario: confirm delivered
- **WHEN** the customer confirms the only shipment of a shipped order
- **THEN** shipment becomes `delivered` and the order `completed`