Hi,
I have a requirement in ERPNext POS where the scanned item’s availability should be checked against the Warehouse configured in the active POS Profile.
For example:
-
POS Profile: Main POS
-
Warehouse: Main Warehouse
-
Item ITEM-001 is not available in Main Warehouse
-
The same item is available in another warehouse
When ITEM-001 is scanned, I expect ERPNext POS to not fetch or add the item from another warehouse. It should only consider the warehouse configured in the active POS Profile.
Is this behavior supported by standard ERPNext POS?
If not, what would be the recommended way to restrict barcode/item lookup to the POS Profile’s warehouse?
I’m using ERPNext v16.
Thanks.
Hi @RahulK2202
I believe Client Scripts can do the job
Hope it helps
Rahul, standard POS uses the active profile’s warehouse for stock checks, but barcode lookup and adding to the cart follow different paths.
I checked the current version-16 lookup code. A barcode match can return from search_by_term before the normal hide_unavailable_items filter. I reproduced that function path with simulated data: Main Warehouse stock = 0 and Hide Unavailable Items enabled still returned the item with actual_qty: 0. This was an isolated source-level check, not a test on your installation.
The POS controller separately checks the profile warehouse when adding quantity, subject to negative-stock settings. An item appearing after scanning therefore does not by itself mean stock was taken from another warehouse. First check both global and item-level Allow Negative Stock.
For your stricter requirement, I would enforce the profile-warehouse rule in barcode lookup and retain server-side validation for submission, including quantities/UOM and serial/batch items. A browser-only Client Script is not sufficient enforcement.
If you want this implemented, I can deliver the complete restriction on your v16 installation for USD 600 total, including my fees, within 3 business days after agreed access and funding: implementation, staging validation, deployment, rollback instructions and 14 days of defect correction. Acceptance: an item stocked only elsewhere cannot be added through this POS; an item with sufficient stock in its assigned warehouse works, including repeated scans. No paid add-on is required.
Is this the standard ERPNext POS or a replacement POS app, and can your hosting install a custom app? Those two details will confirm the deployment route before you commit.