Customer Reports
Customer Reports (internally called Party Reports) covers both customers and suppliers as "parties" — six tabs for account statements, profit contribution per party, a searchable directory, item-level drill-downs and party-group roll-ups.
Overview
This page treats customers and suppliers under one umbrella called a "party". Several tabs use a shared Party Picker control: choose Customer/Supplier/All, then type to search and select the exact party before the report loads.
The six tabs are: Party Statement, Party Wise P&L, All Parties, Party Report by Item, Sale/Purchase by Party and Sale/Purchase by Group.
Party Statement and Party Report by Item require you to pick a specific party before they load anything — they show an empty prompt state until a party is selected.
Before You Start
- Requires a role with Reports permission and the store on the Advanced plan tier or above (reports feature).
- Export buttons only appear for roles with Export permission.
- Party Statement and Party Report by Item need a specific customer or supplier selected via the Party Picker before they show data.
- The Sale/Purchase by Group tab needs parties to have a Party Group assigned on their profile, otherwise it shows "No group data for selected period".
Step-by-Step Guide
1 Look up one party's full account statement
- Open Party Statement, use the Party Picker to choose Customer or Supplier and search/select the exact party by name.
- Set the date range, then read the Closing Balance banner at the top (Dr = amount receivable from them, Cr = advance/overpaid).
- Review Total Debit, Total Credit and Net Balance cards, then scroll the Account Ledger table (date, type, reference, debit, credit, running balance, note).
2 See profit contributed by each customer
- Open Party Wise P&L, set a date range, and review Total Revenue, Total COGS, Total Gross Profit and Active Parties cards.
- Read the Top 10 Parties — Revenue vs Gross Profit bar chart, then use the search box in the table header to filter the full party list by name; the table shows invoices, revenue, COGS, gross profit, margin % and tax per party.
3 Browse and search your full party directory
- Open All Parties, use the All Parties / Customers Only / Suppliers Only buttons, and type in the search box to filter by name.
- Read the Total Customers, Total Suppliers, Total Business and Outstanding cards, plus the Party Mix pie chart.
- Scroll the table for phone/GSTIN, transaction count, total business and outstanding balance per party.
4 Drill into what a specific party bought or supplied
- Open Party Report by Item, pick a party with the Party Picker, and set a date range.
- For a customer, the item table shows Qty Sold, Revenue, COGS, Gross Profit and Invoices per product; for a supplier it shows Qty, Spend and Orders instead.
5 Compare all customers and suppliers side by side
- Open Sale/Purchase by Party, set a date range, and use All/Customers/Suppliers filter buttons plus the search box.
- Read the Top Customers by Sale and Top Suppliers by Purchase bar charts, then the combined table (sale amount + count, purchase amount + count per party).
6 Roll sales and purchases up by party group
- Open Sale/Purchase by Group and set a date range.
- Review Customer Groups and Supplier Groups pie charts with their tables (count, amount, tax per group) — assign a Party Group to your customers/suppliers first if this is empty.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Party Picker | Shared control on Party Statement and Party Report by Item — choose party type (All/Customer/Supplier), search by name, and select the exact party from the dropdown before the report loads. |
Party Statement tab | Ledger of debits/credits/running balance for one selected party, with a Closing Balance Dr/Cr banner. |
Party Wise P&L tab | Revenue, COGS, gross profit and margin per customer, with a top-10 revenue vs gross-profit bar chart and a name search box. |
All Parties tab | Searchable directory of every customer and supplier with total business and outstanding balance, plus a customer/supplier mix pie chart. |
Party Report by Item tab | Product-level breakdown of what one selected party bought (customer) or supplied (supplier), including gross profit for customers. |
Sale/Purchase by Party tab | Side-by-side sale amount and purchase amount per party with top-customer/top-supplier bar charts. |
Sale/Purchase by Group tab | Same sale/purchase totals rolled up by each party's assigned Party Group, shown as pie charts and tables. |
Closing Balance banner | Party Statement only — shows whether the balance is Dr (they owe you) or Cr (you owe them / they overpaid), colour-coded red/green. |
Export button | Downloads the currently loaded tab's table (statement entries, party list, item list, etc.) where Export permission is granted. |
Tips & Best Practices
- A Dr closing balance on Party Statement means the customer/supplier still owes you money; a Cr balance means you owe them (advance payment or overpayment) — do not read Dr/Cr as simply "positive/negative".
- Add a GSTIN to business customers' profiles — it shows up directly in the Party Statement header and several export columns.
- Assign a Party Group to customers and suppliers under their profile if you want the Sale/Purchase by Group tab to be useful — without groups it reports "No group data for selected period".
- Use the Party Picker search field rather than scrolling — it debounces and queries the server as you type, matching name or phone.
Troubleshooting & FAQ
Party Statement / Party Report by Item shows nothing.
Sale/Purchase by Group says "No group data for selected period".
A customer or supplier is missing from All Parties.
Party Wise P&L shows zero gross profit for a customer.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/PartyReports.jsx
Backend endpoints used:
GET /reports/party/all (params: type, search) — Party Picker search + All Parties tabGET /reports/party/statement (params: partyId, partyType, from, to) — Party Statement tabGET /reports/party/profit-loss (params: from, to) — Party Wise P&L tabGET /reports/party/by-item (params: partyId, partyType, from, to) — Party Report by Item tabGET /reports/party/sale-purchase (params: from, to) — Sale/Purchase by Party tabGET /reports/party/sale-purchase-group (params: from, to) — Sale/Purchase by Group tab
Related tables (db-core repositories):
CustomerSupplierSaleSaleItemPurchaseOrder
Redux slices:
scope (selectCurrentScope / getScopeQueryParams)
Feature flag key: reports (requires advanced plan tier or above)
The PartyPicker component is shared between the Party Statement and Party Report by Item tabs and debounces its search query by 300ms before calling /reports/party/all. "Party" is a generic term in this codebase covering both Customer and Supplier records, distinguished by a type field returned from the API.