Skip to content

URD: Reports

ModuleCORE-11Versionv0.5
StatusIn-progressDate2026-06-04

Business documentation. This URD is Reports' feature list - each feature below is one Functional Area (<AREA>). The same <AREA> keys the feature's PRDs (PRD-<AREA>-NNN) and tests (TC-<AREA>-NNN), and each feature is listed in the Delivery feature catalog. See the Feature Spine convention.

1. Purpose

Define user-facing requirements for business reporting - the read-only views an owner uses to run the shop: cashier shift reports (X interim / Z closing) with cash reconciliation, daily sales summaries, product and category breakdowns, and purchase analysis. Reports aggregate over completed orders and closed sessions and never mutate data.

2. Scope

IncludedExcluded
Shift reports - X (interim) and Z (closing)Profit & loss analytics (Planned)
Cash reconciliation (float, sales, expected vs. actual, discrepancy)Inventory valuation reports (Planned)
Daily sales summary by date rangeCustomer / retention analytics (Planned)
Product sales reportExport to PDF / CSV / Excel (Planned)
Category sales + single-category drill-downScheduled auto-generated reports (Planned)
Purchase summary (supplier / PO spending)Tax declaration reports (Tax & Invoice)
Payment-method breakdownTechnical API specifications (see developer docs)
Merchant scoping and date-range filtering

3. Definitions

TermDefinition
X reportAn interim shift summary, pulled while the POS session is still open. Repeatable any number of times.
Z reportThe closing shift report, produced once when a session is closed. Locks a final snapshot.
Cash reconciliationComparison of expected cash (opening float + cash sales − pay-outs) against the actual counted cash, yielding a discrepancy.
Daily summaryPer-day totals (gross, tax, discount, net, order count) over a chosen date range.
Purchase summaryA sales-side view of purchase orders, used to compare cost against revenue.

4. Conceptual Model

Conceptual only - the data model lives in the developer domain model.

5. Feature Catalog

The feature list of this module. Each row is one feature (a Functional Area). Detail in §6. Mirrored in the Delivery feature catalog.

Feature IDFeaturePhaseStatusPriority
SHFShift ReportsP2In-progressHigh
SLSSales ReportsP1BuiltHigh
ACCAccess & ScopingP1BuiltHigh
ADVAdvanced AnalyticsP3PlannedLow

Status: live from Plane where mapped, otherwise registry-declared. Vocabulary mirrors Plane (state-group / phase).

6. Features

One sub-section per feature, in catalog order. Each feature keeps its description, requirements, and acceptance together. Priority = MoSCoW (Must / Should / Could / Won't).

SHF - Shift Reports In-progress

Feature ID: reports/SHF · Phase: P2 · PRDs: - · Dev: @nx/sale

What it does for users: a cashier pulls an interim (X) summary mid-shift and a final (Z) report at close, each with cash reconciliation and a sales summary, plus optional payment-method and category breakdowns.

Requirements

IDPRequirement
URD-SHF-001MX report (interim): generate from the current open session, repeatable
URD-SHF-002MZ report (closing): final report produced once per session at close
URD-SHF-003MCash reconciliation: opening float, cash sales, pay-in/out, expected vs. actual, discrepancy
URD-SHF-004MSales summary on the shift report: gross, discount, tax, net, order count
URD-SHF-005SPayment-method breakdown on the shift report (cash / card / e-wallet)
URD-SHF-006SCategory breakdown on the shift report

Acceptance

AC-SHF-01: Shift X / Z reports
GivenWhenThen
An open POS sessionAn X report is requestedCurrent-shift cash and sales totals are shown; can be repeated
A session being closedThe Z report is generatedFinal totals are locked; exactly one Z report exists per session
A Z reportInspecting itCash reconciliation, sales summary, and (where enabled) payment-method and category breakdowns are present

SLS - Sales Reports Built

Feature ID: reports/SLS · Phase: P1 · PRDs: - · Dev: @nx/sale

What it does for users: an owner or manager sees daily sales totals over a date range, top products by revenue and quantity, category breakdowns with single-category drill-down, and a purchase summary for cost comparison.

Requirements

IDPRequirement
URD-SLS-001MDaily summary: per-day totals (gross, tax, discount, net, order count) over a date range
URD-SLS-002SProduct sales: top products ranked by revenue and quantity
URD-SLS-003SCategory sales: totals broken down by product category
URD-SLS-004SCategory drill-down: detail for a single chosen category
URD-SLS-005SPurchase summary: supplier / purchase-order spending for cost comparison
URD-SLS-006MPeriodic sales summary: group revenue totals (gross, discount, tax, net, order count) by Day, Month, or Year over the chosen date range

Acceptance

AC-SLS-01: Daily sales summary
GivenWhenThen
A from-to date rangeThe daily summary is requestedGross, tax, discount, net, and order count are shown per day
A merchant contextThe same requestResults are scoped to that merchant only
AC-SLS-02: Product & category breakdown
GivenWhenThen
Completed orders with several productsThe product sales report is requestedProducts are ranked by revenue / quantity
The same dataA category is drilled intoThat single category's detail is shown
AC-SLS-03: Flexible periodic revenue aggregation
GivenWhenThen
A filtered time range (e.g. 1 year)The revenue report is requested grouped by MonthTotals of 12 distinct months are returned; each month shows correct gross revenue, discounts, tax, net revenue, and completed order counts
Any filtered time rangeThe grouping interval is toggled between Day/Month/YearThe trend chart and data table update their rows/intervals to match the selected grouping precisely

ACC - Access & Scoping Built

Feature ID: reports/ACC · Phase: P1 · PRDs: - · Dev: @nx/sale

What it does for users: every report is confined to the user's merchant access, requires a date range, counts only completed orders, and renders empty results gracefully - so figures are always correct and never leak across merchants.

Requirements

IDPRequirement
URD-ACC-001MReports are scoped to the user's merchant access; no cross-merchant data leaks
URD-ACC-002MSales reports require a from-to date range
URD-ACC-003MOnly completed orders count toward sales figures; cancelled / draft orders are excluded
URD-ACC-004SEmpty result sets render gracefully (zero totals, no error)

Acceptance

AC-ACC-01: Merchant scoping
GivenWhenThen
A user belonging to Merchant BAny report is requestedOnly Merchant B figures appear; Merchant A data is never returned
A sales report with no matching ordersThe report is requestedTotals show zero; no error is raised

ADV - Advanced Analytics Planned

Feature ID: reports/ADV · Phase: P3 · PRDs: - · Dev: @nx/sale

What it does for users: a future expansion adding profit margin analysis, inventory valuation, customer analytics, export to common file formats, and scheduled report generation.

Requirements

IDPRequirement
URD-ADV-001CProfit analytics: cost vs. revenue margin
URD-ADV-002CInventory valuation: stock value by costing method
URD-ADV-003CCustomer analytics: retention, lifetime value, segmentation
URD-ADV-004CExport to PDF / CSV / Excel
URD-ADV-005WScheduled auto-generated reports

ADV is not built. These requirements are documented for roadmap traceability only and have no test cases until build starts.

Acceptance

AC-ADV-01: Profit analytics (planned)
GivenWhenThen
Completed orders with cost and revenue dataProfit analytics is requestedCost-vs-revenue margin is shown

7. Constraints & Non-Goals

Constraints

IDConstraint
C-01X report is repeatable; the Z report is produced once per session (terminal)
C-02All reports are scoped by the user's merchant access
C-03Sales reports require a from-to date range
C-04Only completed orders are aggregated into sales figures

Non-Goals

  • Profit & loss analytics
  • Inventory valuation reports
  • Customer retention / lifetime-value analytics
  • PDF / CSV / Excel export
  • Scheduled auto-generated reports
  • Real-time dashboard KPI widgets

8. Version History

DateAuthorDescriptionVer
2026-02-26P. Do - Product OwnerInitial user storiesv0.1
2026-04-16P. Do - Product OwnerRestructured into session + sales report areasv0.3
2026-05-29Docs migrationRe-aligned areas (SHF/SLS/ACC/ADV) to verified @nx/sale behavior; marked advanced analytics Plannedv0.4
2026-06-04Claude (AI pair)Reorganize by feature (Feature Spine); each feature carries its own requirements + acceptancev0.5

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.