Skip to content

URD: Reports

ModuleCORE-11Versionv0.4
StatusIn-progressDate2026-05-29

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. Functional Requirements

One table per functional area. <AREA> codes match the test-case IDs. Priority = MoSCoW (Must / Should / Could / Won't).

5.1 Shift Reports (SHF)

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

5.2 Sales Reports (SLS)

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

5.3 Access & Scoping (ACC)

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)

5.4 Advanced Analytics (ADV) Planned

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

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

6. Acceptance Criteria

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
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-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

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

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