Files
vmall/openspec/changes/fulfillment-invoices/tasks.md
T

18 lines
794 B
Markdown

# Tasks: fulfillment-invoices
## 1. Schema
- [ ] Migration: shipments, shipment_items, invoices; status enums; shipment_no/invoice_no sequences
## 2. Shipments
- [ ] POST /api/shop/orders/{id}/shipments (qty validation vs unshipped remainder)
- [ ] POST /api/shop/shipments/{id}/ship; order status propagation (fulfilling/shipped)
- [ ] GET /api/shipments (customer), POST /api/shipments/{id}/confirm-delivered → order completed when done
- [ ] GET /api/shop/shipments
## 3. Invoices
- [ ] POST /api/orders/{id}/invoice (one open invoice per order; amount = order total)
- [ ] GET /api/invoices (customer), GET /api/shop/invoices, POST /api/shop/invoices/{id}/issue
## 4. Tests
- [ ] cargo test: partial shipment qty math, order status propagation, duplicate invoice rejected, issue flow