Barcodes
Barcodes is a three-tab workstation for everything barcode-related: Manage Barcodes to view/assign/generate codes across your catalogue, Scan to Find for an instant scanner-driven product lookup, and Print Labels to build and print a batch of barcode label sheets.
Overview
The three tabs are addressed directly by URL query parameter — Manage Barcodes (?tab=manage), Scan to Find (?tab=scan) and Print Labels (?tab=print) — so each can be bookmarked or linked to individually, and switching tabs updates the URL.
Manage Barcodes shows every product in a searchable/exportable grid (table or card view) with an inline barcode preview, letting you filter to products that have or lack a barcode, edit or clear a single barcode, or auto-generate codes for everything that is missing one in bulk.
Scan to Find is a scanner-first lookup screen: point a barcode scanner at the input (or type a code and press Enter) to instantly see that product's price, MRP, stock and SKU, with a running history of your last 20 lookups.
Print Labels lets you build a print queue by searching products, set copies per product, choose a label size and which fields to show (including a computed shelf-edge unit price like ₹/kg and an optional shelf/bin location), preview every label, then send the sheet to your printer.
Before You Start
- Requires the Advanced plan tier or above (Barcode feature).
- A product needs a barcode assigned before it can be added to the Print Labels queue or found via Scan to Find.
- The Print Labels tab itself is hidden entirely for accounts without Create rights.
Step-by-Step Guide
1 Manage Barcodes — view, filter, generate and edit
The default landing tab (?tab=manage).
- Use the All / Has Barcode / No Barcode filter chips to narrow the list, and the built-in search/sort/export toolbar (table or grid view) to find specific products.
- Click the edit (pencil) icon on a row to reveal an inline editor: type or paste a barcode, click the lightning-bolt button to auto-generate a random one, then Save (check) — or click the × to clear the barcode entirely.
- Click "Auto-Generate Missing" to generate a random barcode for every product that does not have one yet in a single confirmed action.
- Click the printer icon on any row with a barcode to add that product straight to the Print Labels queue — this automatically switches you to the Print tab.
2 Scan to Find — instant lookup
Switch to the Scan to Find tab (?tab=scan).
- The scan input is auto-focused — point a handheld/USB scanner at a barcode, or type the code and press Enter.
- A matching product shows its barcode, name, category, brand, Sale Price, MRP, current Stock (colour-coded red/amber/green by stock level) and SKU.
- An unrecognised code shows a clear "No product found" message instead of a blank result.
- Every lookup (found or not) is added to a Recent Scans history of up to 20 entries with a timestamp; click Clear to reset the history.
3 Print Labels — build a queue and print
Switch to the Print Labels tab (?tab=print) — only visible with Create rights.
- Search for a product (only products that already have a barcode appear in results) and click a result to add it to the queue, or use the printer icon from the Manage tab.
- Adjust how many copies of each product's label you need with the +/− steppers next to each queued item, or remove an item entirely.
- Pick a Label Size — Small (38×25mm), Medium (57×32mm) or Large (100×50mm) — and toggle which fields print: Product Name, Price, SKU, Unit Price (a computed ₹/kg or ₹/l comparison line, e.g. "₹120/kg"), and Shelf Location (bin/aisle info if set on the product).
- Review the live label preview on the right, then click "Print N Labels" — this builds a print-ready HTML sheet and either sends it to an attached receipt/label printer (in the Electron desktop app) or opens your browser's print dialog.
Every Field & Button, Explained
| Field / Button | What it does |
|---|---|
Tab bar (Manage Barcodes / Scan to Find / Print Labels) | Switches tabs and updates the ?tab= URL query parameter; Print Labels is hidden without Create rights. |
Print Queue badge / header button | Shows how many products are currently queued for printing and jumps straight to the Print Labels tab. |
Filter chips: All / Has Barcode / No Barcode | Narrows the Manage Barcodes grid by whether a barcode is assigned. |
Auto-Generate Missing | Generates a random barcode for every product currently without one, after a confirmation prompt. |
Inline barcode editor (per row) | Text input + generate (lightning) + save (check) + clear (×) for that one product's barcode; requires Edit rights. |
Add to print queue (printer icon) | Adds that product to the Print Labels queue and switches you to the Print tab; only shown for products that already have a barcode. |
Barcode preview column | A small rendered barcode graphic per row so you can visually confirm it looks correct before printing. |
Scan input | Auto-focused text field for a handheld scanner or manual typing; Enter (or the Look up button) triggers the lookup. |
Scan result card | Shows the found product's barcode graphic, name, category, brand, Sale Price, MRP, colour-coded Stock, and SKU. |
"No product found" state | Shown when a scanned/typed code does not match any product barcode. |
Recent Scans (+ Clear) | Rolling history of up to 20 lookups (found or not) with product name/price and timestamp; Clear empties the list. |
Products to Print search | Server-side search restricted to products that already have a barcode assigned. |
Print queue list (+/− steppers, remove) | Adjust how many copies of each queued product's label to print, or remove it from the queue. |
Label Size (Small/Medium/Large) | Sets the physical label dimensions (38×25mm / 57×32mm / 100×50mm) used for both preview and the printed sheet. |
Show on Label toggles | Product Name, Price, SKU, Unit Price (computed ₹/kg or ₹/l) and Shelf Location — each independently shown/hidden on every label in the batch. |
Label preview panel | Live-renders every queued label (times its copy count) exactly as it will print, using the current size and field toggles. |
Print N Labels | Builds the print-ready sheet and sends it to the Electron print API if running as a desktop app, otherwise opens the browser print dialog. |
Tips & Best Practices
- Use Auto-Generate Missing right after a Bulk Import of new products so every new SKU is scannable immediately, then spot-check a few in Scan to Find.
- Turn on the Unit Price toggle for loose/weighed goods and small packaged items — it gives shoppers a per-kg/per-litre comparison the way large retail chains do.
- Add products to the print queue directly from the Manage tab's printer icon while you're already reviewing which items are missing labels, instead of searching for them again on the Print tab.
- Keep a barcode scanner plugged in and the Scan to Find tab open at a customer service desk for instant price checks without opening the full Products page.
Troubleshooting & FAQ
A product won't show up when I search on the Print Labels tab.
Scan to Find says "No product found" for a code I know exists.
The Unit Price line is missing from my labels.
Clicking Print does nothing in the browser.
I don't see the Print Labels tab at all.
🧑💻 Developer Notes
Source component(s):
frontend-app/packages/pos-react-lib/src/pages/BarcodePage.jsx
Backend endpoints used:
GET /productsPOST /products/barcodes/generatePATCH /products/:id/barcodeGET /products/barcode/:code
Related tables (db-core repositories):
ProductInventory
Feature flag key: barcode (requires advanced plan tier or above)
Tab state is synced two-way with the ?tab= URL search parameter via React Router's useSearchParams, so deep-linking to any tab works. The Manage tab is built on the shared DataGrid component (search/sort/pagination/export/table-grid toggle) also used elsewhere in pos-app. Print rendering uses jsbarcode to draw CODE128 barcodes into an off-screen SVG before building the print HTML string, and detects window.electronAPI?.printInvoice to route straight to a configured printer inside the desktop app instead of opening a browser print dialog.