Itemwise Sale groups matching sale lines by item and shows how many line occurrences each item has. Sales Count is not unit quantity: one line with quantity 10 counts as one, while the same item on two separate lines counts as two. The current query is also not restricted to kitchen-processed sales despite appearing inside KOT Reports.
Menu path
Reports -> Sales -> KOT Reports -> Itemwise Sale
Verified from
Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/modules/kotReport.html Itemwise Sale table pagination and export control, frontend/static/script/js/modules/js/report_kot.js item report filtering rendering pagination and CSV export, api/src/controllers/sales.controller.js itemSalesReportTable eligibility access and date behavior, api/src/services/sale.service.js item-line normalization grouping sorting and count calculation, demo.posnic.io Itemwise Sale captured on 2026-09-11
KOT Itemwise SaleLive demo captured 2026-09-11. This current screen shows three grouped products; Bath Soap Bar appears on two matching sale lines, while the other products appear once each.
What Sales Count Means
Situation
Displayed count
Why
One sale line has quantity 10
1
The report counts the grouped line occurrence, not units.
The same item appears on two lines
2
Each matching unwound sale line adds one.
Two legacy records have the same item ID
Combined
The item ID is the primary grouping key.
A line has no item ID
Grouped by item name
The saved or item-master name becomes the fallback key.
Need units, revenue or profit
Not shown
The API calculates quantity, amount, average and profit, but this screen renders only Item Name and Sales Count.
Run the Report
Open Reports, then Sales.
Open KOT Reports and select Itemwise Sale.
Open Filter and choose the date range.
Select one or more branches. Unlike several neighboring KOT reports, Itemwise Sale sends every selected branch to the API.
Apply the filter.
Read the highest-frequency items first; rows are primarily sorted by total unit quantity even though quantity is not displayed.
Change the page size to 5, 10, 25, 50 or 100, or use Previous and Next.
Use the share icon inside the Itemwise Sale tab to export all matching groups.
Which Sales Are Included
Rule
Current behavior
Operational meaning
Sale process
Add, Edit and PartialReturn are included.
Partial-return records can add line occurrences; this is not a gross-sales ranking.
KOT flag
was_kot_proceeded is not required.
The KOT screen location does not prove that listed lines reached the kitchen.
Date field
Eligibility uses updated_date from start through end of day.
Editing a sale can move its lines into a later reporting period.
Branch
All selected branch IDs are included; the current branch is the fallback.
Combined results have no branch column, so run branches separately when attribution matters.
Session filter
Users with Sales Session Filter can be restricted to their permitted login-session period.
A manager and cashier can see different counts for the same selected dates.
Access
Report Read permission is required.
A permission failure is not a zero-result report.
How Items Are Grouped and Ordered
Each matching sale is expanded into its item lines before grouping.
The report uses the sale-line item ID, then legacy item_id, then the item-master ID; when no ID exists it falls back to the normalized item name.
The displayed name comes from the saved line first, then legacy line fields, then the current item master.
Deleted or changed item-master records can still appear when the sale retained a usable line name.
Rows sort by summed unit quantity descending, then summed line amount descending, then name alphabetically.
Because the screen hides quantity and amount, a row with Sales Count 1 can rank above a row with Sales Count 2 when its one line had a larger quantity.
The backend supports an optional variant-family grouping mode, but the current browser does not request it; displayed rows remain per item.
Read the Screen
Control or column
Meaning
Important detail
#
Position within the current page.
It continues from the current page offset.
Item Name
Normalized saved or master item name.
The table does not show SKU, barcode, category or variant family.
Sales Count
Number of matching sale-line occurrences in the item group.
It is not quantity, order count or customer count.
Page size
Maximum grouped items returned per page.
Default is 5.
Showing X to Y of Z
Current group range and total item groups.
Z counts grouped items, not sales or units.
Share icon
Export all matching item groups to CSV.
This is the dedicated Itemwise export control.
Export All to CSV
Confirm the branch set and date range.
Wait for the on-screen report to finish loading and note its total item-group count.
Select the share icon at the right of the Itemwise table.
Posnic requests page 1 with the last known total as the page limit.
Open KOT_Itemwise_Sale_YYYY-MM-DD.csv; the filename date is the download date, not the selected period.
Confirm the two columns are Item Name and Sales Count.
Compare the exported row count with the on-screen total before using the file.
Export and Audit Limits
The CSV does not include branch, selected dates, item ID, SKU, barcode, unit quantity, amount, tax, discount, profit, sale ID, operator or customer.
Item names are written without CSV quoting or escaping; commas, quotes or line breaks in a name can shift columns or rows.
Export All relies on the total from the most recent screen response, so newly changed data can make the requested export incomplete or stale.
The browser restores the original page after a fixed 500 ms delay. On a slow connection, that normal reload can overlap the export-all request; always verify the downloaded row count and content.
The page-level PDF, CSV, Excel and Email controls above the tabs belong to other KOT report behavior; use the dedicated Itemwise share icon for this grid.
Item names are inserted into generated table HTML without explicit escaping; restrict catalog names to trusted business data.
Troubleshooting
Problem
Check
Action
Sales Count differs from quantity
Whether one line sold multiple units
Use a quantity-aware item or sales report; Itemwise counts lines.
A non-KOT counter item appears
Whether its sale process and updated date match
This query does not enforce the KOT flag; reconcile in Sales History.
An old sale appears today
Whether the sale was edited today
The report filters updated_date, not sale date.
Branch totals cannot be separated
How many branches were selected
Run and export one branch at a time.
CSV columns are broken
Commas, quotes or line breaks in item names
Review the file before import and correct or safely process affected names.
CSV has fewer rows than expected
On-screen total, current data changes and connection speed
Reload the report, export again and verify every item group.
No Records appears
Selected branches, updated-date range, eligible sale process, permission and session restriction
Test a known sale line under the same user and scope.