Skip to content

docs: file REPORTS-01 — the figures the company already calculates - #74

Merged
PapiCuche merged 1 commit into
mainfrom
docs/reports-handoff
Oct 20, 2026
Merged

PapiCuche merged 1 commit into
mainfrom
docs/reports-handoff

Conversation

@PapiCuche

Copy link
Copy Markdown
Owner

Documentation only. No code, no behaviour change.

REPORTS-01 was named as a priority blocker and had never been written down — the one gap somebody could mistake for unfinished Mobile work.

What the web has: the inventory dashboard is five reads and the commissions page a sixth, all under /api/admin/ — low stock, high stock, best selling, no movement, commission settlement. Exactly one crossed to the native surface (inventory/summary/), and Mobile already shows it.

So: an inventory.reports holder opens the internal area and sees the summary and nothing else; a sales.analytics.view holder sees nothing at all, because no v1 route answers to that capability.

Why Mobile does not rebuild them: «lo más vendido» is a ranking over a period, «sin rotación» is a time window, a commission is a settlement with closing rules. Summing inventory/movements/ client-side would produce a number that disagrees with the console — two different answers to one question are worse than none.

Filed with the capability split the platform itself declares (inventory.reports rather than inventory.view; sales.analytics.view for the aggregate), amounts as decimal strings, and the calculation window explicit in the response — a dashboard that does not say which period it covers invites being read as «today».

🤖 Generated with Claude Code

Named as a priority blocker and never written down, which made it the one gap
somebody could mistake for unfinished Mobile work.

The web's inventory dashboard is five reads and the commissions page a sixth,
all under `/api/admin/`: low stock, high stock, best selling, no movement, and
the commission settlement. Exactly one of them crossed to the native surface —
`inventory/summary/` — and Mobile already shows it. So an `inventory.reports`
holder opens the internal area and sees the summary and nothing else, and a
`sales.analytics.view` holder sees nothing at all, because no v1 route answers
to that capability.

Mobile does not rebuild them, and the handoff says why in the terms that
matter: «lo más vendido» is a ranking over a period, «sin rotación» is a time
window, a commission is a settlement with closing rules. Summing
`inventory/movements/` in the client would produce a number that disagrees with
the console, and two different answers to one question are worse than none.
The server already calculates these; what is missing is the door.

Filed with the capability split the platform itself declares — `inventory.reports`
rather than `inventory.view`, `sales.analytics.view` for the aggregate — amounts
as decimal strings, and the calculation window explicit in the response, because
a dashboard that does not say which period it covers invites being read as
«today».

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PapiCuche
PapiCuche merged commit d5c35e1 into main Oct 20, 2026
3 checks passed
@PapiCuche
PapiCuche deleted the docs/reports-handoff branch October 20, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant