Gs1MessageBuilder

Functions

Link copied to clipboard

Adds any AI with its value, e.g. add(Gs1Ai.GTIN, "09501101020917") or add("7003", "2612311430").

Link copied to clipboard
fun amountPayable(amount: String, currency: String? = null): Gs1MessageBuilder

(390n / 391n) Amount payable, as a decimal string, optionally with an ISO 4217 numeric currency.

Link copied to clipboard

(10) Batch or lot number.

Link copied to clipboard
fun bestBeforeDate(year: Int, month: Int, day: Int): Gs1MessageBuilder

(15) Best before date. day 0 means the last day of the month.

Link copied to clipboard

(02) GTIN of the contained trade items (use with count).

Link copied to clipboard

(37) Count of trade items contained in a logistic unit.

Link copied to clipboard
fun expiryDate(year: Int, month: Int, day: Int): Gs1MessageBuilder

(17) Expiration date. day 0 means the last day of the month.

Link copied to clipboard
fun expiryDateTime(year: Int, month: Int, day: Int, hour: Int, minute: Int): Gs1MessageBuilder

(7003) Expiration date and time.

Link copied to clipboard

(330n) Logistic gross weight in kilograms, as a decimal string (see netWeightKg).

fun grossWeightKg(kilograms: Double, decimals: Int): Gs1MessageBuilder

(330n) Logistic gross weight in kilograms rounded to decimals decimal places.

Link copied to clipboard

(01) GTIN. GTIN-8, GTIN-12 and GTIN-13 are padded to 14 digits with leading zeros. The check digit must be included (see Gs1CheckDigit.append).

Link copied to clipboard

(313n) Height in metres, as a decimal string.

Link copied to clipboard

(311n) Length in metres, as a decimal string (see netWeightKg).

Link copied to clipboard

(414) Location GLN, 13 digits.

Link copied to clipboard

(315n) Net volume in litres, as a decimal string (see netWeightKg).

fun netVolumeL(litres: Double, decimals: Int): Gs1MessageBuilder

(315n) Net volume in litres rounded to decimals decimal places.

Link copied to clipboard

(310n) Net weight in kilograms, as a decimal string: the decimals written choose the AI, so "1.250" gives (3103)001250 and "12.5" gives (3101)000125.

fun netWeightKg(kilograms: Double, decimals: Int): Gs1MessageBuilder

(310n) Net weight in kilograms rounded to decimals decimal places.

Link copied to clipboard

(400) Customer's purchase order number.

Link copied to clipboard

(422) Country of origin, ISO 3166 numeric code (e.g. 724 for Spain).

Link copied to clipboard
fun packagingDate(year: Int, month: Int, day: Int): Gs1MessageBuilder

(13) Packaging date.

Link copied to clipboard
fun price(amount: String, currency: String? = null): Gs1MessageBuilder

(392n / 393n) Price of a variable measure trade item, as a decimal string, e.g. "4.95". With an ISO 4217 numeric currency (e.g. "978" for euro) AI 393n is used.

Link copied to clipboard
fun productionDate(year: Int, month: Int, day: Int): Gs1MessageBuilder

(11) Production date. day 0 means the last day of the month.

Link copied to clipboard
fun sellByDate(year: Int, month: Int, day: Int): Gs1MessageBuilder

(16) Sell by date.

Link copied to clipboard

(21) Serial number.

Link copied to clipboard

(410) Ship to GLN, 13 digits.

Link copied to clipboard

(00) SSCC, 18 digits including the check digit.

Link copied to clipboard

(30) Variable count.

Link copied to clipboard

(312n) Width in metres, as a decimal string.