Key Reports
Key Reports is the fastest place to check business health — one page with four tabs (Sales, Stock, GST, Profit) covering revenue trends, stock value, GST liability and profit margins, switchable without leaving the page.
Overview
Key Reports is a single page with four tabs — Sales Report, Stock Report, GST Report and Profit Analysis — selected with the tab strip at the top. Each tab keeps its own filters and data independently of the others.
The active tab is written to the page URL as a ?tab= query parameter (?tab=sales, ?tab=stock, ?tab=gst, ?tab=profit), so you can bookmark or share a link straight to, say, the GST tab and it will open there directly.
The GST and Profit Analysis tabs are wrapped in a plan-tier gate: they only render for stores on the Advanced plan or above. Sales Report and Stock Report are available to any tier that can see the Reports menu at all.
Before You Start
- You need a role with Reports permission to open this page at all.
- The GST Report tab requires the
gstfeature at the Advanced plan tier or above — on lower tiers the tab content is hidden. - The Profit Analysis tab requires the
reportsfeature at the Advanced plan tier or above. - Export buttons and the GSTR-1 JSON download only appear for roles with Export permission (checked via
canExport).
Step-by-Step Guide
1 Sales Report tab — revenue, discounts and payment mix
The default tab when the page loads (?tab=sales).
- Pick a date range with the From/To date pickers, or use the This Month, Last Month or This Year quick-range buttons in the Period bar.
- Choose how the trend chart is bucketed with the Daily / Weekly / Monthly dropdown next to the date pickers.
- Click Refresh to reload; the button shows a spinning icon while loading.
- Read the four stat cards — Total Revenue, Avg Order Value, Total Discount, Total Tax — then scroll to the Revenue Trend bar chart (Revenue/Tax/Discount per bucket).
- Check the Payment Method Breakdown donut chart and the Top Customers table (rank, name, orders, revenue) below it.
2 Stock Report tab — live inventory health
- Use the All Products / Low Stock / Out of Stock filter buttons to switch which product list is shown.
- Type in the search box to filter by product name or SKU.
- Click any column header (Product, SKU, Category, Stock Qty, Min Level, Stock Value, Cost, Price) to sort by that column; click again to reverse the sort direction.
- Read the five summary cards — Total Products, Total Items, Inventory Value, Low Stock count, Out of Stock count — above the table.
- Scroll to Recent Stock Movements (last 20) to see recent restocks, sales, adjustments and their before/after quantities.
- If you have Export permission, click Export to download the currently filtered/sorted product list as a spreadsheet.
3 GST Report tab — output tax and GSTR-1 export
Only visible on the Advanced plan or above; requires the gst feature.
- Set the date range (defaults to the current month) and click Refresh.
- Review the six stat cards: Taxable Amount, Total GST, CGST, SGST, IGST, Invoices.
- Scroll to Tax Rate Summary — GST collected grouped by rate slab (0/5/12/18/28%).
- Scroll to HSN-wise Summary (GSTR-1) — taxable value, CGST/SGST/IGST and total tax per HSN code; this table stays empty until you assign HSN codes to your products.
- Scroll to B2B Invoice Register (GSTR-1 Table 4) — only customers with a GSTIN on file appear here; it stays empty until you add GSTIN to customer profiles.
- Check the B2C Summary (GSTR-1 Table 7) card, then click Download GSTR-1 JSON to get a JSON payload (B2B invoices, B2C summary, HSN details) formatted for upload to the GST portal.
4 Profit Analysis tab — margins and cost of goods sold
Only visible on the Advanced plan or above; requires the reports feature.
- Set the date range, or use the This Month / This Year / Last Year quick-range buttons, then Refresh.
- Review the six stat cards: Revenue, COGS, Gross Profit (with margin %), Expenses, Net Profit (with margin %), Discount Given.
- Read the Monthly Profit Trend bar chart comparing Revenue, COGS and Gross Profit over time.
- Check Top Profitable Products (revenue and gross profit per product — this table stays empty until Cost Price is set on your products) and Profit by Category side by side, each with its own Export button.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Tab strip (Sales / Stock / GST / Profit) | Switches the active report; the choice is written to the URL as ?tab= so each tab is directly bookmarkable/shareable. |
Period / date range + quick-range buttons | From/To date pickers plus This Month, Last Month, This Year (and Last Year on Profit) one-click presets shared across the Sales, GST and Profit tabs. |
Daily / Weekly / Monthly dropdown | Sales Report only — controls how the Revenue Trend chart buckets data. |
All Products / Low Stock / Out of Stock filters | Stock Report only — switches which product subset the table and export show. |
Search box (Stock Report) | Client-side filter on the currently selected product subset, matched against name or SKU. |
Sortable column headers (Stock Report) | Click a header to sort ascending, click again to reverse; sort state is kept in the page while you filter or search. |
Refresh button | Re-runs the active tab's API call immediately; disabled and spinning while a request is in flight. |
Export button | Downloads the current tab's table (Stock Report products, GST rate/HSN/B2B tables, Profit top-products/category tables) as a spreadsheet; only shown to roles with Export permission. |
Download GSTR-1 JSON | GST tab only — direct download link (not a table export) that produces a JSON payload with B2B invoices, B2C summary and HSN details, formatted for the GST portal's JSON upload. |
Recent Stock Movements table | Stock Report only — last 20 inventory movements with type, quantity change, before/after quantity and note. |
Tips & Best Practices
- Bookmark
/reports?tab=gstor/reports?tab=profitso your accountant or manager lands straight on the right tab. - Assign HSN codes to every product — the HSN-wise Summary (GSTR-1) table on the GST tab is only useful once products have HSN codes.
- Add GSTIN to customer profiles that are businesses — this is what makes them show up in the B2B Invoice Register instead of only the B2C Summary.
- Set Cost Price on all products — the Profit Analysis tab's Top Profitable Products and Profit by Category tables are empty for products with no cost price on file.
Troubleshooting & FAQ
Why don't I see the GST or Profit Analysis tab content?
The HSN-wise Summary table on the GST tab is empty.
The B2B Invoice Register is empty even though I sell to businesses.
Top Profitable Products on the Profit tab shows "No data — ensure costPrice is set on products".
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/Reports.jsx
Backend endpoints used:
GET /reports/sales (params: from, to, groupBy)GET /reports/stockGET /reports/gst (params: from, to) — gated by TierGate feature="gst"GET /reports/gst/gstr1 (direct download link, params: from, to)GET /reports/profit (params: from, to) — gated by TierGate feature="reports"
Related tables (db-core repositories):
SaleSaleItemProductInventoryInventoryMovementCustomer
Redux slices:
scope (selectCurrentScope / getScopeQueryParams)
Feature flag key: reports (requires advanced plan tier or above)
Tab state is synced to the URL via React Router's useSearchParams, so the active tab survives a page refresh. GST and Profit tabs are each wrapped in a TierGate component that checks a different feature key ("gst" vs "reports") but the same "advanced" minimum tier. Each tab manages its own AbortController so switching tabs quickly cancels any in-flight request instead of racing it.