Reports

Review Item Sales Count Across Branches

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

SituationDisplayed countWhy
One sale line has quantity 101The report counts the grouped line occurrence, not units.
The same item appears on two lines2Each matching unwound sale line adds one.
Two legacy records have the same item IDCombinedThe item ID is the primary grouping key.
A line has no item IDGrouped by item nameThe saved or item-master name becomes the fallback key.
Need units, revenue or profitNot shownThe API calculates quantity, amount, average and profit, but this screen renders only Item Name and Sales Count.

Run the Report

  1. Open Reports, then Sales.
  2. Open KOT Reports and select Itemwise Sale.
  3. Open Filter and choose the date range.
  4. Select one or more branches. Unlike several neighboring KOT reports, Itemwise Sale sends every selected branch to the API.
  5. Apply the filter.
  6. Read the highest-frequency items first; rows are primarily sorted by total unit quantity even though quantity is not displayed.
  7. Change the page size to 5, 10, 25, 50 or 100, or use Previous and Next.
  8. Use the share icon inside the Itemwise Sale tab to export all matching groups.

Which Sales Are Included

RuleCurrent behaviorOperational meaning
Sale processAdd, Edit and PartialReturn are included.Partial-return records can add line occurrences; this is not a gross-sales ranking.
KOT flagwas_kot_proceeded is not required.The KOT screen location does not prove that listed lines reached the kitchen.
Date fieldEligibility uses updated_date from start through end of day.Editing a sale can move its lines into a later reporting period.
BranchAll 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 filterUsers 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.
AccessReport 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 columnMeaningImportant detail
#Position within the current page.It continues from the current page offset.
Item NameNormalized saved or master item name.The table does not show SKU, barcode, category or variant family.
Sales CountNumber of matching sale-line occurrences in the item group.It is not quantity, order count or customer count.
Page sizeMaximum grouped items returned per page.Default is 5.
Showing X to Y of ZCurrent group range and total item groups.Z counts grouped items, not sales or units.
Share iconExport all matching item groups to CSV.This is the dedicated Itemwise export control.

Export All to CSV

  1. Confirm the branch set and date range.
  2. Wait for the on-screen report to finish loading and note its total item-group count.
  3. Select the share icon at the right of the Itemwise table.
  4. Posnic requests page 1 with the last known total as the page limit.
  5. Open KOT_Itemwise_Sale_YYYY-MM-DD.csv; the filename date is the download date, not the selected period.
  6. Confirm the two columns are Item Name and Sales Count.
  7. 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

ProblemCheckAction
Sales Count differs from quantityWhether one line sold multiple unitsUse a quantity-aware item or sales report; Itemwise counts lines.
A non-KOT counter item appearsWhether its sale process and updated date matchThis query does not enforce the KOT flag; reconcile in Sales History.
An old sale appears todayWhether the sale was edited todayThe report filters updated_date, not sale date.
Branch totals cannot be separatedHow many branches were selectedRun and export one branch at a time.
CSV columns are brokenCommas, quotes or line breaks in item namesReview the file before import and correct or safely process affected names.
CSV has fewer rows than expectedOn-screen total, current data changes and connection speedReload the report, export again and verify every item group.
No Records appearsSelected branches, updated-date range, eligible sale process, permission and session restrictionTest a known sale line under the same user and scope.