zplCore.comzplCore.com

CheckDigits

public static class CheckDigits

Check digit helpers used by the expression engine (Mod10, Luhn, Mod11, Mod43, VoicePickCode).

Methods

Method SignatureReturnsDescription
static # Luhn(string digits)stringLuhn (ISO/IEC 7812) check digit. Non-digits are ignored.
static # Mod10(string digits)stringGS1 / UPC modulo 10 check digit (weights 3,1,3,… from the right). Non-digits are ignored.
static # Mod11(string digits)stringModulo 11 check digit with weights 2..7 cycling from the right; remainder 0 → "0", 1 → "X".
static # Mod43(string data)stringCode 39 modulo 43 check character.
static # VoicePickCode(string gtin, string lot, string? date = default)stringProduce Traceability Initiative voice pick code: CRC-16 (polynomial 0x1021, initial value 0) over the ASCII text GTIN + lot (+ optional pack date YYMMDD); the four least significant decimal digits of the CRC.