Question

How to type the barcode on item arrival journal --> Line's EAN128/UCC128 field so that it give the item number and quantity?

For example:

enter image description here

Here if I type only 01M0001 and press enter it gives itemId "M0001" in Item number field and if I type only 30100 it gives the "100.00" in Quantity field.

What I want to do is to have item number and quantity together with one entered barcode.

It does not work if I type them together like it is on the picture.

How can I achieve it?

Thanks.

Was it helpful?

Solution

The decoding logic in class BarcodeEAN128, methode decode treats the GTIN (which is identified by the 01 application identifier) as a fixed length field of length 14 (compare to the macro EAN_LEN in the class declaration). Since your ItemId only has 5 characters, the following characters that would define the quantity are treated as part of the ItemId. If you increase the ItemId to 14 characters, it should decode the ItemId and quantity correctly. See also GS1-128 for a list of application identifiers and their length.

OTHER TIPS

You could try 241M0001+30100 or 241M0001+37100 (where + is a FNC1 character (since 241, 30 and 37 are all variable-length fields). Strictly, 30 and 37 should only be used with 01 or 02 - but these identifiers refer to 14-digit numeric fields.

Another possibility is 95M0001100 where the 5 could be 1 to 5. These are user-defined. Structure them as you will - but don't expect anyone outside of your organisation to understand them.

(strictly EAN-128 as she is designed - no comment on exactly how your application is going to interpret the data. Strictly, 01 and M0001 are incompatible since M0001 is not a valid GTIN)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top