Settings
Configure Receiving Autofocus on Each Device
Add Receiving and Edit Receiving autofocus are independent, device-local switches saved immediately in browser IndexedDB. They focus item search after key receiving actions, but an empty supplier correctly redirects the cursor to Supplier first.
- Menu path
- Manage -> Core Settings -> Receivings -> Auto focus on this device
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/modules/settings_write.html Receivings Auto focus on this device switches, frontend/static/script/js/modules/js/device_settings.js immediate IndexedDB save restore and reset, frontend/static/script/js/core/PosnicPro.js recevingAutoFocus IndexedDB schema, frontend/static/script/js/modules/js/receiving_add.js page-open line-add clear and add/edit focus behavior, frontend/static/script/js/modules/js/receiving_add.js barcode scanner detection and empty-supplier focus guard
Choose the Right Device Behavior
| Device/workflow | Add Receiving | Edit Receiving |
|---|---|---|
| Dedicated receiving station with scanner | Enable | Enable when staff frequently correct/add lines. |
| Office computer used mainly for review | Optional | Disable when staff need to inspect header fields first. |
| Touch-only tablet | Test first | Test first; automatic keyboard opening can interrupt review. |
| Shared terminal with mixed duties | Enable only if item entry dominates | Choose according to the common edit task. |
| Supplier must always be chosen manually | Can remain enabled | Can remain enabled; empty supplier redirects focus to Supplier. |
Configure This Device
- Use the exact workstation, browser profile or desktop installation that will receive stock.
- Open Manage -> Core Settings -> Receivings.
- Under Auto focus on this device, set Add Receiving for new purchase entry.
- Set Edit Receiving independently for existing purchase edits.
- The switches save immediately when changed; do not rely on the general Core Settings Save button for this local behavior.
- Open a new purchase and an editable purchase to test both paths.
- Repeat configuration on every other workstation because the setting does not travel as a branch-wide rule.
What Happens When Enabled
| Moment | Enabled behavior | Disabled behavior |
|---|---|---|
| Open New Purchase | Item search is focused after receiving setup. | Item search is explicitly blurred. |
| Add an item line | Focus returns to item search for rapid next entry. | The field is blurred after the line action. |
| Clear receiving form | Focus returns to item search. | The field remains unfocused. |
| Open/Edit purchase | Edit switch controls focus on item search. | Edit item search is blurred. |
| Supplier is empty | Item-search focus handler moves the cursor to Supplier. | Operator selects the intended field manually. |
Test with a Barcode Scanner
- Select or verify the supplier first.
- Open New Purchase and confirm the visible cursor is in item search.
- Scan a known item barcode once.
- Confirm exactly one matching item line is added with correct quantity, cost and tax context.
- Confirm focus returns to item search after the line is added.
- Scan a second known item and verify no characters went into Supplier, quantity, payment note or another field.
- Scan an unknown barcode and confirm Posnic shows Not found while returning focus to item search.
- Complete the same test on Edit Receiving only when that workflow is enabled.
Understand Device Scope
- The setting is stored in the local `recevingAutoFocus` IndexedDB record.
- Its record carries the current branch ID, but one local record ID is used for the device behavior.
- Changing the active branch does not prove another computer received the same switches.
- Clearing browser/site data, changing browser profile or reinstalling can reset local behavior.
- New device initialization and reset paths default Add Receiving and Edit Receiving to enabled.
- Record desired settings in workstation setup documentation rather than assuming cloud synchronization.
When to Disable Autofocus
| Symptom | Reason to disable | Alternative |
|---|---|---|
| Touch keyboard opens unexpectedly | Focused item search triggers the device keyboard. | Disable and tap search only when entering items. |
| Reviewer edits dates or payment fields first | Automatic item focus interrupts the review sequence. | Disable Edit Receiving on that workstation. |
| Scanner targets the wrong field | Focus timing or supplier selection is incomplete. | Disable temporarily, fix workflow/device setup and retest. |
| Assistive-technology focus order is confusing | Programmatic focus may disrupt navigation context. | Disable and use intentional keyboard navigation. |
| Mixed-use public terminal | Unexpected scans or typing could enter item search. | Disable and require deliberate field selection. |
Troubleshooting
| Problem | Likely reason | Controlled response |
|---|---|---|
| Switch changed but another computer did not | Autofocus is device-local. | Configure and test the other device separately. |
| Cursor goes to Supplier | No supplier is selected; the item field guard redirects focus. | Select the supplier, then return to item search. |
| Cursor does not remain in item search | Switch is off, local data reset, modal took focus or another handler intervened. | Recheck the local switch and test from a fresh purchase. |
| Barcode text appears but item is not added | Scan timing/terminator does not match detection or barcode is unknown. | Test scanner Enter suffix and a known barcode; review SKU/barcode setup. |
| One scan adds unexpected item | Barcode mapping is wrong or duplicated. | Stop receiving and correct item barcode records before continuing. |
| Reset changed both receiving switches | Device reset writes both Add and Edit Receiving as enabled. | Set each switch back to the approved workstation behavior. |
| Behavior vanished after cleanup | Browser or app data containing IndexedDB was cleared. | Reconfigure the device and repeat the scanner test. |
Workstation Checklist
- Add and Edit Receiving switches match this device's job.
- Supplier-first behavior works when no supplier is selected.
- Known scanner barcode adds exactly one intended item.
- Unknown barcode produces a controlled Not found result.
- Focus returns correctly after line entry and form clear.
- Touch keyboard and accessibility behavior remain usable.
- Every receiving workstation is configured and tested separately.