Purchase
Search, Scan and Add Items to a Purchase
Purchase search checks the active branch catalog by name, item code, primary barcode and extra barcodes. Scanner input searches barcode fields only; repeated selection increments an existing line, so every scan must be confirmed against item and quantity.
- Menu path
- Purchase -> Purchases -> New Purchase -> Supplier -> item search
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/static/script/js/modules/js/receiving_add.js receiving autocomplete debounce stale-response guard selection and refocus, frontend/static/script/js/modules/js/receiving_add.js scannerDetection timing Enter suffix barcode lookup and unknown warning, api/src/controllers/items.controller.js getReceivingItemsAjaxList, api/src/repositories/item.repository.js getReceivingItemsAjaxList search fields branch scope instant exclusion and 10-result default, frontend/static/script/js/modules/js/receiving_add.js searchItemReceiving duplicate quantity behavior
Choose Supplier Before Item Entry
- Open New Purchase or an editable purchase.
- Select and verify the supplier first.
- Click item search only after Supplier shows the intended vendor.
- Remember that normal item lookup searches the active branch catalog; it is not restricted to the selected supplier.
- Confirm the chosen product is actually supplied by this vendor before adding it.
Search by Name, SKU or Barcode
| Input | Fields searched | Operator check |
|---|---|---|
| Product name | Item name using case-insensitive substring matching. | Use brand, size or variant text to narrow similar names. |
| SKU/item code | Stored item code using case-insensitive substring matching. | Select the exact item; a partial code can match several products. |
| Primary barcode | Main barcode field. | Compare the complete code when more than one result appears. |
| Extra barcode | Alternate barcodes list. | Verify alternate pack/unit meaning before receiving quantity. |
| Scanner | Primary and extra barcode fields only. | Scanner should send the code followed by Enter. |
| No result | Offers Create item in typed search; scanner shows Not found. | Search again before creating or editing catalog data. |
Add a Line by Keyboard
- Type enough of the name, SKU or barcode to identify the product.
- Wait for the suggestion list; lookup is delayed briefly while typing and stale responses are discarded.
- Review item name, current cost and stock context in the suggestion.
- Select the intended result rather than assuming the first suggestion is correct.
- Confirm the row appears at the top of the purchase table.
- Check unit, quantity, cost, tax and total.
- The search field clears and refocuses for the next item when device autofocus is enabled.
Scan a Purchase Item
- Use a configured keyboard-wedge scanner on the receiving workstation.
- Configure the scanner to transmit Enter after each barcode.
- Select the supplier and place focus in item search.
- Scan one known barcode once.
- Confirm exactly one intended item row appears and its quantity is 1 unless it already existed.
- Scan the same code again and verify the existing line quantity increases by one.
- Scan a known extra barcode and confirm its intended item and pack/unit policy.
- Scan an unknown code and confirm Posnic shows Barcode item not found without adding a line.
Current Search Boundaries
| Boundary | Current behavior | Operational consequence |
|---|---|---|
| Branch | Only items accessible to the active branch are queried. | Switch to the correct branch before receiving. |
| Supplier | The normal lookup request includes supplier ID, but the current repository search does not filter by it. | Manually verify supplier-item relationship. |
| Result count | Autocomplete defaults to at most 10 returned items. | Type more specific text when the expected product is not visible. |
| Instant items | Quick-sale/instant items are excluded. | Receive stock only into normal reusable items. |
| Deleted items | This lookup does not explicitly apply the supplier-fill deleted-item exclusion. | If an apparently deleted item appears, stop and inspect its catalog status. |
| Match style | Regular-expression-safe, case-insensitive substring match. | Partial or shared codes can produce multiple candidates. |
| Barcode scan response | Every returned barcode match is passed to add-line logic. | Duplicate or overlapping barcode data can add multiple rows from one scan. |
Understand Repeated Matches
When an item already exists on the current purchase, selecting or scanning it again replaces the visible row with an increased quantity instead of creating a second row.
- A second scan normally means quantity 2, not a duplicate row.
- The increment path uses integer parsing for the repeated quantity, so review fractional-item workflows carefully.
- Pack conversion is a separate explicit action; a barcode does not automatically multiply quantity by units per pack.
- After rapid scanning, compare physical count with every line quantity before saving.
- Use the remove control only after checking whether the line contains several scans.
Barcode Data Readiness
- Each physical code should identify one intended item in the active catalog.
- Do not reuse one barcode across variants, sizes or unrelated products.
- Use extra barcodes only for legitimate alternate labels that map to the same stock item.
- Keep SKU and barcode meanings distinct unless the shop intentionally uses Same as SKU.
- For purchase packs, configure purchase unit and conversion factor, then train staff to use the visible conversion control.
- Test receiving and sale scanning after every barcode change.
Troubleshooting
| Problem | Likely reason | Controlled response |
|---|---|---|
| Cursor jumps to Supplier | No supplier is selected. | Select the supplier, then return to item search. |
| Expected item is not in first results | More than 10 broad matches exist. | Type a fuller name, SKU or barcode. |
| Scanner types text but does not add | Timing is too slow, Enter suffix is missing, or input lost focus. | Configure scanner suffix and retest on the correct field. |
| Barcode item not found | Primary/extra barcode is absent or different. | Inspect the item record and physical label; do not create a duplicate blindly. |
| One scan adds multiple rows | Overlapping or duplicate barcode matches were returned. | Stop receiving, remove incorrect lines and correct barcode data. |
| Quantity unexpectedly increased | Item was already on the purchase or scan repeated. | Reconcile physical count and set the correct line quantity. |
| Wrong supplier's item appears | Normal search is branch-wide rather than supplier-filtered. | Choose only the correct product and clean supplier assignments. |
| Deleted-looking item appears | Receiving lookup lacks an explicit deleted-item filter. | Do not receive into it until catalog status is verified. |
Scanner Acceptance Checklist
- Supplier-first focus behavior works.
- Known primary barcode adds one intended item.
- Known extra barcode maps to the intended item.
- Unknown barcode adds no line.
- Repeated scan increments only the intended quantity.
- No duplicate barcode adds multiple rows.
- Pack conversion and base-unit count are understood.
- Cost, tax and total remain correct after rapid entry.