Serial numbers

110 views
Skip to first unread message

Ulrik Tuemand

unread,
Jul 17, 2014, 5:29:31 AM7/17/14
to erpnext-dev...@googlegroups.com
Hi Guys,

A lot of our products is serialised, which means that the barcode on the product contains the product number and the serial. how do i make sure that when i want to scan my outgoing goods, that it only reads the serial, and not the  complete information?

Best Regards

Ulrik

Umair Sayyed

unread,
Jul 17, 2014, 7:49:48 AM7/17/14
to erpnext-dev...@googlegroups.com
What is the format in the barcode like?
For example, if it is "{{ item_code }} | {{ serial_no }}", you can write javascript code to split the string by | and only keep the serial_no when the value in entered in the field.


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8e671899-a5c8-4cf1-b5b0-8f0ab8be7199%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks and Regards,
Umair Sayyed
www.erpnext.com

Ulrik Tuemand

unread,
Jul 18, 2014, 4:34:36 AM7/18/14
to erpnext-dev...@googlegroups.com
Hi Umair,

We have two different types of barcodes.

The first contain part no. + serial like the following:

012+00002GF SN200011+0593

The second type is a dobbelt barcode which contains part nr. serial harware and production week plus cuntry of origin:

FG002+00002 (Part no. should be typed FG002-00002) M1312
B133924(start serial) SN0020(End serial) R204 Y1345 CZ (The serial should be read 133924-0020)

Do you have any examples on how this could be handled in java?

Best regards

Ulrik



On Thursday, 17 July 2014 13:49:48 UTC+2, Umair Sayyed wrote:
What is the format in the barcode like?
For example, if it is "{{ item_code }} | {{ serial_no }}", you can write javascript code to split the string by | and only keep the serial_no when the value in entered in the field.
On Thu, Jul 17, 2014 at 2:59 PM, Ulrik Tuemand <u.tu...@gmail.com> wrote:
Hi Guys,

A lot of our products is serialised, which means that the barcode on the product contains the product number and the serial. how do i make sure that when i want to scan my outgoing goods, that it only reads the serial, and not the  complete information?

Best Regards

Ulrik

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Rushabh Mehta

unread,
Jul 21, 2014, 12:59:33 AM7/21/14
to erpnext-dev...@googlegroups.com
Ulrik - here is a solution

1. Create a custom field where you will insert a barcode.
2. In the onchange event, write a Custom Script that will insert a new item row and split your barcode.

You might want to find a freelancer to help you do this.




To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/89cede3f-326b-427f-8e43-5c5504bc1613%40googlegroups.com.

Ulrik Tuemand

unread,
Sep 16, 2014, 4:54:31 AM9/16/14
to erpnext-dev...@googlegroups.com
Hi Guys,

I finally managed to create the javascript i would implement.

However i will need some modification and i would appriciate your help to do so.

  1. <!DOCTYPE html>
  2. <html>
  3.  
  4. <head>
  5.         <title></title>
  6.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7.         <script type="text/javascript">
  8.                 function convertSN(value) {
  9.                     var splitted = value.split(" ");
  10.                     if (splitted.length === 2) {
  11.                         document.getElementById("done").value = splitted[1].substring(2).replace("+","-");
  12.                     }
  13.                     else if (splitted.length === 5) {
  14.                         document.getElementById("done").value = splitted[0].substring(1)+"-"+splitted[1].substring(2);
  15.                     }
  16.                 }
  17.         </script>
  18. </head>
  19.  
  20. <body>
  21. <form action="#">
  22. <input type="text" placeholder="Scan barcode" onkeypress="convertSN(this.value)">
  23. <input type="text" placeholder="output" id="done">
  24. </form>
  25. </body>
  26. </html>

I would need to change this script so i can point i directly to the field add serial, so i would be able just to scan each unit.

Rushabh Mehta

unread,
Sep 16, 2014, 5:53:49 AM9/16/14
to erpnext-dev...@googlegroups.com
Ulrik

You will have to create a new Custom Script in your ERPNext instance


best,
Rushabh



@rushabh_mehta

1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/f3c0885d-6681-4d7d-b5fa-e069b5f99957%40googlegroups.com.

Ulrik Tuemand

unread,
Sep 16, 2014, 5:55:33 AM9/16/14
to erpnext-dev...@googlegroups.com
Hi Rush,

So far so good. That i am aware of.

My question is how do i point this script directly to the field "add serial" in stock entry f.x. The script should only be bound to this specific field.
Rushabh



@rushabh_mehta

Rushabh Mehta

unread,
Sep 16, 2014, 5:58:51 AM9/16/14
to erpnext-dev...@googlegroups.com
On 16-Sep-2014, at 3:25 pm, Ulrik Tuemand <u.tu...@gmail.com> wrote:

Hi Rush,

So far so good. That i am aware of.

My question is how do i point this script directly to the field "add serial" in stock entry f.x. The script should only be bound to this specific field.

You have to add a listener like

frappe.ui.form.on("Stock Entry", "add_serial", function(frm) { 
   // "frm.doc" will give you access to all properties of the doc
}):

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/97690e53-987c-4125-a60a-9ff21343fa5b%40googlegroups.com.

Ulrik Tuemand

unread,
Sep 24, 2014, 5:38:28 AM9/24/14
to erpnext-dev...@googlegroups.com
I haven't been able to resolve this, and since it is a part of my BA i do not have the finances to to cover pro. help. therefore i will not continue with this.
Reply all
Reply to author
Forward
0 new messages