Skip to content

Add prepared Business reporting API and desktop worker - #1006

Closed
sridharkalaibala wants to merge 5 commits into
codex/business-accessfrom
codex/business-reporting
Closed

sridharkalaibala wants to merge 5 commits into
codex/business-accessfrom
codex/business-reporting

Conversation

@sridharkalaibala

@sridharkalaibala sridharkalaibala commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Business mobile reads need prepared, scoped amounts without running desktop reports on Cloud. This adds a bounded overview API and an asynchronous desktop worker, with version-2 sales definitions reconciled against the real sale writer. Discounts are not deducted twice; paid KOT bills count; older-bill returns belong to their return day.

Reads recheck current ACL, branch membership and publisher generation, and return unavailable rather than fabricated zeros. Desktop preparation has a lease, cancellation and work limits. Business sessions do not consume selling-handset slots; explicit IP blocks remain effective.

Owners with branch membership can explicitly replace the reporting desktop using live candidate presence, assignment generations and a durable audit journal. An opt-in Community desktop mode prepares and publishes locally without Cloud or a sync agent; the operator supplies secure HTTPS access. Neither mode silently steals another publisher's assignment.

Local validation: 17 real-Mongo auth/read/preparation/management tests, 82 metric/sale-writer tests, 52 desktop route/classification/handset checks, API lint/format, generated docs, declared dependencies and attribution passed. Crash recovery covers both Cloud publication and Community process restart. No CI jobs were added.

Stacked on #1003. Companion Gateway and mobile changes are required for Cloud; Community desktop deployment is documented separately. This remains draft pending large-history performance, source-completeness checkpoints and deployed/native qualification. Summaries are always labelled partial or delayed.

@sridharkalaibala

Copy link
Copy Markdown
Contributor Author

The complete Business companion stack, including this change, is integrated into develop through #1023. All checks, including CodeQL, passed before merge. Closing this superseded stacked PR.

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