Skip to content

v0.1.21 — top-products + ABC ranking

Choose a tag to compare

@pabloalvarez99 pabloalvarez99 released this 18 May 01:06
619ca3b

top-products report (ABC / Pareto)

GET /api/v1/reports/top-products?from&to&limit — product sales ranking. qty_sold = Σ order_item.quantity; revenue = Σ order_item.subtotal; revenue_pct (2dp); abc_class from cumulative revenue of the full ranking (A ≤80%, B ≤95%, C rest); 1-based rank. limit (default 50, 1..=500) truncates output after ABC is computed over the full ranking, so a top-N still reports each product's true ABC class. refunded/cancelled excluded, tenant-scoped.

ABC shows which SKUs move the till — the base for assortment/purchasing calls. Closes BACKLOG #9 nearly (only stock-rotation remains). Additive, no migration.

MSI

pharma-server-0.1.21-x86_64.msi — 12,214,272 bytes
sha256: d1a6f86734f4b15053e55f578c6ae453c84039241e09ab5c12b9625e12e2ba5d

Smoke-verified: MajorUpgrade over v0.1.20, service Running, / {"version":"0.1.21"}, /health/ready 200 db:ok.

🤖 Generated with Claude Code