![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
On Sat, 25 Feb 2006 14:26:47 GMT, "Doug Kanter" ancientangler (AT) hotmail (DOT) com> wrote: "Steve Urbach" <dragonsclaw (AT) NOTmindspring (DOT) com> wrote in message news:tjlvv1l6qpivs6t4nj6r44q6vv2vvfj6e7 (AT) 4ax (DOT) com... On Fri, 24 Feb 2006 17:17:31 GMT, "Doug Kanter" ancientangler (AT) hotmail (DOT) com> wrote: ) Or validate yourself <G ;Check digit including the number system digit ; 01234567890 ; Note: COUNTS positrons from right to left ; excluding the check digit ; Add all odd position digits (0+2+4+6+8+0 =20) ; mult 20 by 3 ; Add all the EVEN position digits (1+3+5+7+9=25) ; Add the results (60+25 = 85) ; The check digit is 10- (85 Mod 10) Steve, what would be the purpose of this? The purpose of this type of data is to allow us to look up a UPC, look in the next column, and see the customer's proprietary item code. If we want to offer an item for sale, many customers want to see their code on the printed / emailed offer. If we make any kind of corrections to their data, it could result in our shipping thousands of dollars of incorrect product, and the stuff is not returnable to the factory. I'll use a script to make cosmetic changes for easier readability. But, any other changes to such a file can only be done after discussing discrepancies with a human from the company who sent us the data. The above code allows you to verify the UPC check digit is correct for the rest of the digits. Most supermarket Back-office systems DO NOT check this if hand keyed (the scanner does it auto magically). This will only validate the UPC is programmatically correct, not that is the correct one for the product described :/ (I used the above code as part of a reconstruct the check digit process for EAN exported from NCR2127 systems that truncate to 12 chars or BASSpoint systems that set the check digit to 0. ) BTW none of the systems I work with allow spaces or non-numeric entries (some even balk at using &, -, %, in description fields). |
![]() |
| Thread Tools | |
| Display Modes | |
| |