web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Checksum algorithm for EAN-8 bar code type in AX

Galyna Fedorova Profile Picture Galyna Fedorova 3,566

Haven’t you ever thought about checksum algorithm for EAN-8 bar code type in AX?

An EAN-8 is a barcode and is derived from the longer European Article Number (EAN-13) code. It was introduced for use on small packages where an EAN-13 barcode would be too large; for example on cigarettes, pencils (though it is rarely used for pencils), and chewing gum packets.

EAN-8 barcodes begin with a 2- or 3-digit GS1 prefix (which is assigned to each national GS1 authority – company code) 5- or 4-digit item reference element depending on the length of the GS1 prefix), and a checksum digit.

Here is how an EAN-8 bar code looks like

ean8barcode

Let’s setup all necessary preconditions in AX:

Bar code setup:

Retail and commerce > Inventory management > Bar codes and labels > Barcode setup

or

Organization administration > Setup > Bar codes

Having filled Bar code type as EAN8, you can create Bar code for the item

bar-code-setup

Navigate to Product information management > Products > Released products

Switch to Manage inventory tab and click Bar codes button

Specify newly created bar code setup, insert Bar code and save the record.

The system will check that you’ve inserted incorrect bar code displaying error message

item-bar-code

Suggest working out what the calculation is.

Check digit calculated according to Modulo 10

Go ahead and calculate digit for our case

Our barcode is 23456789

  1. 2+4+6+8=20
  2. 20*3=60
  3. 3+5+7=15
  4. 60+15=75
  5. 75 + X = 80 (next highest multiple of 10), therefore X = 5 (checksum)

So the system expecting check digit 5

In other words, calculating the Checksum looks like:

  1. Add the values of the digits in positions 1, 3, 5, 7
  2. Multiply this result by 3.
  3. Add the values of the digits in positions 2, 4, 6.
  4. Sum the results of steps 2 and 3.
  5. The check character is the smallest number which, when added to the result in step 4, produces a multiple of 10.

Having changed last digit to 5, you will manage to save the record

item-bar-code-check-digit-pass


This was originally posted here.

Comments

*This post is locked for comments