Product: LABELVIEW, CODESOFT
Version: All Versions
|
OVERVIEW
The UPSCheckDigit («string») formula returns the UPS check characters. The input for the method is a string. This method leaves the rest of the tracking number up to you. It takes a 15 character sequence, and calculates the check digit using this sequence.
- The first two characters must be "1Z".
- The next 6 characters we fill with our UPS account number "XXXXXX".
- The next 2 characters denote the service type:
- "01" for Next Day Air shipments.
- "02" for Second Day Air shipments.
- "03" for Ground shipments.
- The next 5 characters is our invoice number (our invoices are 6 digits; we drop the first digit, e.g., the 123456 invoice would yield 23456 characters).
- The next 2 digits is the package number, zero filled. E.g., package 1 is "01", 2 is "02".
- The last and final character is the check digit.
NOTE: The described sequence above gives 17 characters, where as only need 15 are needed to calculate the check digit. To do this, drop the "1Z" portion, and only use the last 15 characters in the method.
|