[New Feature Proposal]Barcode scan to create/update records in child table, useful for stock movement and orders

@rishinikhil
just tried on beta.erpnext.com, it works for sales invoice also, you can check it.


it turned out that system auto converted some of the quote sign " ’ after upload into the forum thread( maybe due to my windows system in Chinese locale?), see the 2 version comparison in PC Charm as attached,
you can copy the most updated/correct version of the code either from beta.erpnext.com or here
SAPScript/scan_bar_code at master · szufisher/SAPScript · GitHub

1 Like

This is a really excellent feature and you guys deserve recognition for it. Please submit a pull request to get it into the core.

1 Like

@szufisher, Yes. I copied the custom script from beta.erpnext and it worked.

good to hear that, I am thinking to submit a new pull request, adding this feature into core!

3 Likes

@szufisher, this is failing.

As soon as the count crosses 60-70 items, the page slows down. It becomes a confusion for the data entry guy whether the record has been added or not. He then scrolls down to check it, and finds that it has not been added.

Now how do we go about it? following is what I can think

  1. An alert which tells that the item has been added.
  2. Reverse the order of rows, so that the data entry guy can check without scrolling. i am not sure if this is possible.
  3. Side by side view like in POS.

What do you think?

yes, the same feature in other system(actually vba Excel based)has some kind of feedback per each scan, we got to add these kind of feedback!

@rishinikhil
the updated code can be copied from here SAPScript/ERPNext Barcode Scan V2 at master · szufisher/SAPScript · GitHub

let me know the result, thanks.

@rishinikhil,
can you let me know the current status of the updated version?

@szufisher, I am sorry, I was travelling. Will check and get back to you. Thanks.

I copied @szufisher and put it in a branch with some additional changes at https://github.com/SaiFi0102/erpnext/tree/ChildTable-Barcode-Scan (branch of master: 10.1.43)

I also added a TODO list and a question:
-Determine whether it would be better to wait for enter pressed/blur event to run the handler or use a timeout to run the handler (in my branch I’m currently using timeout)
-Allow the scan field to search for: batch number, serial number, item code

I have deployed the code, will let you know the results by Wednesday. Thanks a lot for your efforts.

@rishinikhil,
Can you help to update the current status? thanks.

Hi @szufisher, the team says its better than before. They like the feature which tells them the row number when the item is incremented.

Its also not slowing up the page when items more than 70-80 are added.

What did you do for the page speed?

Glad to hear that the user likes it!

For fixing the speed issue, local variable is created in the function, reading local variable other than accessing global object’s property via dot(.) operator is more efficient because traversing the prototype chain (mapping table) avoided.

Please kindly mark it as accepted solution, then this thread can be closed.

Hello @szufisher have you been able to submit a pull request yet?

@adam26d,
the current approach is to customize the form by adding one dummy barcode field into the target doctype, which is not a neat solution because it created unused field in the backend database, so it is better to just create the dummy barcode field on frontend, need sometime to try.

1 Like

@szufisher Any progress with the same?

@LifeP,
not ready so far,

pull request created [New Feature]Scan Item Barcode label to quick create/update records in items child table by szufisher · Pull Request #15329 · frappe/erpnext · GitHub

2 Likes

Now adding something new , lets suppose a system is working on Serialized Inventory now we dont have barcodes we have serial number , in POS profile it is happening , the current requirement is , one should just keep on scanning the serial numbers which are printed as barcodes and the quantity should keep on increasing instead of scanning the first one and then opening a pop up and adding serial numbers there,