Repository navigation
docs: file REPORTS-01 — the figures the company already calculates - #74
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.reportsholder opens the internal area and sees the summary and nothing else; asales.analytics.viewholder 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.reportsrather thaninventory.view;sales.analytics.viewfor 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