[v13] Point of Sales Beta - Item is not getting added in cart if scanned using a barcode scanner

Hello Community,

I am facing an issue while making a pos invoice.
After scanning a barcode, the product is not getting added to cart automatically, i have to press enter key, (it slows down the billing process).

While searching on google i found that there may be a problem with barcode scanner, that barcode scanner transmits an enter key automatically, it can be set up with barcode scanner.
I checked with my barcode scanner its transmitting enter key after barcode.


Observe log in above screen, Is this a bug in point of sales or its the default behavior ?

Need help in this topic.

ERPNext: v13.0.0-beta.4 (version-13-beta)
Frappe Framework: v13.0.0-beta.4 (version-13-beta)
Browser : Tried with mozilla and chrome both.

It is working fine.

In Stock Settings > Need to check “show Barcode Field” then go to Stock >> Item >> add barcode for that item. refer attached screen.


@Balaji thanks for reply, but thats not the issue, issue is at the time of creating pos invoice, please refer the gif above, in scan barcode field, if i scan using a barcode scanner, item is not getting added in cart automatically, need to press an extra enter key, even though my scanner is sending enter key in suffix with barcode.

@Laxman_Tandon . Have you done above setting which was mentioned in my previous reply.
I am also facing same issue. after done above setting, it is working fine. Please check & confirm.

i am experiencing same issue…the issue is with the Point Of Sales page. items don’t drop automatically when scanned.

1 Like

@Balaji when you scan items in the PoS page, do you have to press enter key before the items drop into the cart?

That is the problem

I reported this in version 11 as shown below and it was fixed by @rohit_w

Maybe we should look to him for this resolution again

@olamide_shodunke Yes! , but I have checked in version 12 its working as expected, i have reported this bug in github

Found a temporary solution using below custom script POS Invoice

cur_page.page.addEventListener('keydown', function(event) {    
    if(event.key == 'Enter' || event.key == 'Tab') {
        setTimeout(() => { 
        if (cur_pos.$components_wrapper.find(".item-wrapper").length == 1) {
        }, 800);        

Hi @Laxman_Tandon

This does not appear to be working for me, can you throw more light into this ? What does this script do for you?

Thanks, your temporary fix worked.