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

Purchase item entryChoose the supplier, then search or scan into the item field and verify the resulting line.
Prepare item scan dataPrimary and extra barcodes can match purchase search; purchase unit and conversion settings control pack handling after selection.
Verify every added lineA successful match is not the final check: confirm item, unit, quantity, cost and tax before save.

Choose Supplier Before Item Entry

  1. Open New Purchase or an editable purchase.
  2. Select and verify the supplier first.
  3. Click item search only after Supplier shows the intended vendor.
  4. Remember that normal item lookup searches the active branch catalog; it is not restricted to the selected supplier.
  5. Confirm the chosen product is actually supplied by this vendor before adding it.

Search by Name, SKU or Barcode

InputFields searchedOperator check
Product nameItem name using case-insensitive substring matching.Use brand, size or variant text to narrow similar names.
SKU/item codeStored item code using case-insensitive substring matching.Select the exact item; a partial code can match several products.
Primary barcodeMain barcode field.Compare the complete code when more than one result appears.
Extra barcodeAlternate barcodes list.Verify alternate pack/unit meaning before receiving quantity.
ScannerPrimary and extra barcode fields only.Scanner should send the code followed by Enter.
No resultOffers Create item in typed search; scanner shows Not found.Search again before creating or editing catalog data.

Add a Line by Keyboard

  1. Type enough of the name, SKU or barcode to identify the product.
  2. Wait for the suggestion list; lookup is delayed briefly while typing and stale responses are discarded.
  3. Review item name, current cost and stock context in the suggestion.
  4. Select the intended result rather than assuming the first suggestion is correct.
  5. Confirm the row appears at the top of the purchase table.
  6. Check unit, quantity, cost, tax and total.
  7. The search field clears and refocuses for the next item when device autofocus is enabled.

Scan a Purchase Item

  1. Use a configured keyboard-wedge scanner on the receiving workstation.
  2. Configure the scanner to transmit Enter after each barcode.
  3. Select the supplier and place focus in item search.
  4. Scan one known barcode once.
  5. Confirm exactly one intended item row appears and its quantity is 1 unless it already existed.
  6. Scan the same code again and verify the existing line quantity increases by one.
  7. Scan a known extra barcode and confirm its intended item and pack/unit policy.
  8. Scan an unknown code and confirm Posnic shows Barcode item not found without adding a line.

Current Search Boundaries

BoundaryCurrent behaviorOperational consequence
BranchOnly items accessible to the active branch are queried.Switch to the correct branch before receiving.
SupplierThe normal lookup request includes supplier ID, but the current repository search does not filter by it.Manually verify supplier-item relationship.
Result countAutocomplete defaults to at most 10 returned items.Type more specific text when the expected product is not visible.
Instant itemsQuick-sale/instant items are excluded.Receive stock only into normal reusable items.
Deleted itemsThis lookup does not explicitly apply the supplier-fill deleted-item exclusion.If an apparently deleted item appears, stop and inspect its catalog status.
Match styleRegular-expression-safe, case-insensitive substring match.Partial or shared codes can produce multiple candidates.
Barcode scan responseEvery 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

ProblemLikely reasonControlled response
Cursor jumps to SupplierNo supplier is selected.Select the supplier, then return to item search.
Expected item is not in first resultsMore than 10 broad matches exist.Type a fuller name, SKU or barcode.
Scanner types text but does not addTiming is too slow, Enter suffix is missing, or input lost focus.Configure scanner suffix and retest on the correct field.
Barcode item not foundPrimary/extra barcode is absent or different.Inspect the item record and physical label; do not create a duplicate blindly.
One scan adds multiple rowsOverlapping or duplicate barcode matches were returned.Stop receiving, remove incorrect lines and correct barcode data.
Quantity unexpectedly increasedItem was already on the purchase or scan repeated.Reconcile physical count and set the correct line quantity.
Wrong supplier's item appearsNormal search is branch-wide rather than supplier-filtered.Choose only the correct product and clean supplier assignments.
Deleted-looking item appearsReceiving 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.