v0.1.20 — daily gross-margin report
margins-daily report
GET /api/v1/reports/margins-daily?from&to — daily gross-margin rollup over order/order_item. revenue = Σ order_item.subtotal; cost = Σ quantity × product.cost_price for items with a known cost; plus margin, margin_pct (revenue-relative, 2dp), and an honest items_without_cost count for lines whose product or cost_price is unset. refunded/cancelled excluded, tenant-scoped, UTC-day buckets.
Lets the owner see real margin, not just turnover. Closes BACKLOG #9 partial (rotation/ABC/top-products remain). Additive, no migration.
MSI
pharma-server-0.1.20-x86_64.msi — 12,193,792 bytes
sha256: 1307888d92ca7670fc8e0116754f1409a5765fe8e309b1d915734fb428ca8f5c
Smoke-verified: MajorUpgrade over v0.1.19, service Running, / {"version":"0.1.20"}, /health/ready 200 db:ok.
🤖 Generated with Claude Code