Invoice Barcode construction rules

When an Invoice or Mail Order Invoice is set to a status of Invoiced for a customer who has the ‘Invoice Barcode’ configuration set to something other than ‘None’ under Customer Maintenance > Distributor button, an Invoice Barcode will be stored. The Barcode is created based on the option selected. Rule for how detailing how each Barcode option are below:

  • None- No Barcode will be created.
  • PO Number only – A Barcode will be created that has:
    • Max length 18 characters
    • No check digit
    • No left padding
  • Invoice Number only – A Barcode will be created that has:
    • Max length 18 characters
    • No check digit
    • No left padding
  • Prefix + PO Number – A Barcode will be created that has:
    • Max length 18 characters
    • Concatenate the Prefix and the PO Number to create a barcode
    • When the Barcode length is less than 18 characters:
      • If the Barcode is numeric, add a check digit, then add zeros to the start of the number until it is a length of 18.
      • If the Barcode is alphanumeric, do not add a check digit, simply add zeros to the start of the Barcode value until it is a length of 18.
    • When the Barcode length is greater than or equal to 18 characters, take the rightmost 18 digits of the value, then:
      • If the Barcode is numeric, take the rightmost 17 digits, then add a check digit.
      • If the Barcode is alphanumeric, leave the barcode as it is.
  • Prefix + Invoice Number – A Barcode will be created that has:
    • Max length 18 characters
    • Concatenate the Prefix and the Invoice Number to create a barcode
    • When the Barcode length is less than 18 characters:
      • If the Barcode is numeric, add a check digit, then add zeros to the start of the number until it is a length of 18.
      • If the Barcode is alphanumeric, do not add a check digit, simply add zeros to the start of the Barcode value until it is a length of 18.
    • When the Barcode length is greater than or equal to 18 characters, take the rightmost 18 digits of the value, then:
      • If the Barcode is numeric, take the rightmost 17 digits, then add a check digit.
      • If the Barcode is alphanumeric, leave the barcode as it is.