Reports Phase A In-progress
Reports turns transaction data into the numbers an owner runs the business on: end-of-shift cash reconciliation (X/Z reports), daily sales summaries, what is selling, and how categories and suppliers compare. It is read-only — it aggregates over completed orders and closed sessions rather than changing anything.
1. Identity
| Property | Value |
|---|---|
| Module ID | CORE-11 |
| Tier | Core |
| Status | In-progress |
| Phase | P1 (daily sales summary) · P2 (shift X/Z reports, product / category / purchase analysis) · P3 (advanced analytics) |
| Priority | MEDIUM |
| Primary users | Owner · Manager · Cashier |
2. Purpose & Scope
| Included | Excluded |
|---|---|
| Cashier shift reports — X (interim) and Z (closing) | Profit & loss analytics (Planned) |
| Cash reconciliation: float, sales, pay-in/out, expected vs. actual | Inventory valuation reports (Planned) |
| Daily sales summary by date range | Customer / retention analytics (Planned) |
| Product sales (top sellers by revenue & quantity) | Export to PDF / CSV / Excel (Planned) |
| Category sales + single-category drill-down | Scheduled auto-generated reports (Planned) |
| Purchase summary (supplier / PO spending) | Tax declaration reports (Tax & Invoice) |
| Merchant-scoped, date-ranged queries | Technical API specifications (see developer docs) |
3. Capabilities
| Capability | What the user can do | Status |
|---|---|---|
| Daily sales summary | View gross, tax, discount, net totals and order count per day across a date range | Built |
| Product sales | See top-selling products ranked by revenue and quantity | Built |
| Category sales | Break down sales by product category | Built |
| Category drill-down | Inspect a single category's performance | Built |
| Purchase summary | Review purchase-order / supplier spending for cost comparison | Built |
| Shift reconciliation (Z report) | Close a shift and get expected-vs-actual cash plus a locked session snapshot | Built |
| X report (interim) | Pull a mid-shift summary while the session is still open | In-progress |
| Payment-method breakdown | See totals split by cash / card / e-wallet | In-progress |
| Profit analytics | Compare cost vs. revenue (margin) | Planned |
| Inventory valuation | Value stock on hand (AVCO / FIFO) | Planned |
| Customer analytics | Retention, lifetime value, segmentation | Planned |
| Export & scheduling | PDF / CSV / Excel export and auto-generated reports | Planned |
The mock-data and stubbed-export findings from earlier QE assessments applied to a legacy admin reporting API. Built sales reporting now runs on the
@nx/saleSalesReportService, which pushes every aggregation down to indexed SQL over completed orders — see Test Cases for the verified behavior.
4. Module Dependencies
| Depends on | Why |
|---|---|
| Orders | Completed sale orders and POS sessions are the source of every sales and shift figure |
| Product | Product and category names drive the product / category breakdowns |
| Payment | Payment records back the cash reconciliation and payment-method split |
| Inventory | Purchase orders feed the purchase summary (cost comparison) |
5. Backend Packages
Implementation detail lives in the developer docs — this section only maps the module to the services that power it.
| Package | Role | Developer docs |
|---|---|---|
@nx/sale | Sales aggregation (SalesReportService) and shift X/Z reporting (ShiftService, PosSessionReport) | sale |
6. Key User Flows
Daily sales report
Shift X / Z reports
7. Roles & Permissions
| Role | Can | Cannot |
|---|---|---|
| Cashier | Pull the X report for their own open shift; close their shift to produce the Z report | View cross-merchant or business-wide sales analytics |
| Manager | View all sales / product / category / purchase reports for their merchant; review any shift | See other merchants' data |
| Owner | All manager reporting across their merchants | — |
Reports are always scoped to the user's merchant access; a user can never see another merchant's figures.
8. Status & Roadmap
| Phase | Capabilities |
|---|---|
| P1 | Daily sales summary by date range (gross, net, tax, discount, count) |
| P2 | Shift X/Z reports with cash reconciliation, product sales, category sales + drill-down, purchase summary, payment-method breakdown |
| P3 | Profit analytics, inventory valuation, customer analytics, PDF/CSV/Excel export, scheduled reports, dashboard KPI widgets |
9. Related Pages
- URD
- Test Cases
- PRDs
- Orders · Product · Payment · Inventory
- Developer docs: Sales Report · Shift / POS Session