Ean 13

maikelj
Member Posts: 50
Hi everyone,
Can anybody tell me where I can find some code to calculate
an EAN13 code?
With kind regards,
Maikel
Can anybody tell me where I can find some code to calculate
an EAN13 code?
With kind regards,
Maikel
0
Comments
-
You'll find the routine in the C/SIDE on-line help (lookup STRCHECKSUM):The STRCHECKSUM function can be used to calculate checksums for 13- and 8-digit EAN (European Article Number) and EAN compatible bar codes such as UPC (Universal Product Code) or JAN (Japanese Article Number).
A 13-digit EAN code has this format:
The system uses the 12 digits in positions 13 to 2 to calculate the checksum at position 1.
Starting with position 2, the system totals all even values. It then multiplies the result by three. This value is called Even.
Starting with position 3, the system totals all odd values. The result is called Odd.
Total = Even + Odd.
The modulus 10 checksum is then: (10 - Total MOD 10) MOD 10.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Thanks for the formula Luc.
Maikel0 -
0
-
HI,
I'LL ABLE TO asigne 12 DIGITS UPC to all my items USING No. Series FUNTION , but I Need to generate the 13 digit "UPC Check Digit"
Any Idea how to doit?
Thanks
Bolko de Pawlikowski0 -
Luc Van Dyck wrote:You'll find the routine in the C/SIDE on-line help (lookup STRCHECKSUM):The STRCHECKSUM function can be used to calculate checksums for 13- and 8-digit EAN (European Article Number) and EAN compatible bar codes such as UPC (Universal Product Code) or JAN (Japanese Article Number).
A 13-digit EAN code has this format:
The system uses the 12 digits in positions 13 to 2 to calculate the checksum at position 1.
Starting with position 2, the system totals all even values. It then multiplies the result by three. This value is called Even.
Starting with position 3, the system totals all odd values. The result is called Odd.
Total = Even + Odd.
The modulus 10 checksum is then: (10 - Total MOD 10) MOD 10.0 -
I know I can calculate the check digit of a 12 digit UPC with an excel formula if I enter the first 11
A1=first 6
b1=next 5
=IF(OR($A1="",$B1="")=TRUE,"",CEILING((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1),10)-((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1)))
- I'm wondering if you google it that the calculation for 13 digits exist.0 -
EXAMPLE
081184501000 (NUMBER WITHOUT CHECK DIGIT)
#1. YOU HAVE TO ADD THE PAIR POSITIONS
8+1+4+0+0=13
Multply by 3
12*3=39
#2. YOU HAVE TO ADD THE IMPAIR:
0+1+8+5+1+0=15 ,
Sum #1+#2 : 39+15=54
The check digit is the lower number need it to add to make 54 multiple of 10 in this case 6
Result: 0811845010006
Sorry for my englishSavatage wrote:I know I can calculate the check digit of a 12 digit UPC with an excel formula if I enter the first 11
A1=first 6
b1=next 5
=IF(OR($A1="",$B1="")=TRUE,"",CEILING((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1),10)-((SUMPRODUCT(MID(($A1&$B1),{1,3,5,7,9,11},1)*1)*3)+SUMPRODUCT(MID(($A1&$B1),{2,4,6,8,10},1)*1)))
- I'm wondering if you google it that the calculation for 13 digits exist.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions