Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust CODE_128 to handle odd number of digits #55

Merged
merged 2 commits into from
Jan 12, 2019

Conversation

richayles
Copy link

This is a change so that handling for CODE_128 auto takes into account an odd number of digits after an initial string. This then works for international DPD shipping integration "NOTE: If the postcode is all numeric, use subset B for the first 2 digits of the data
string, e.g. %0, followed by subset C for the rest of the barcode."

Example %008099915501071048275101276
Previously this would output

  • SUBSET B = %, length 1
  • SUBSET C = 00809991550107104827510127, length 26
  • SUBSET B = 6, length 1
    Now expected outcome is
  • SUBSET B = %0, length 2
  • SUBSET C = 08099915501071048275101276, length 26

richayles added 2 commits November 21, 2017 16:28
This is a change so that handling for CODE_128 auto takes into account an odd number of digits after an initial string. This then works for international DPD shipping integration "NOTE: If the postcode is all numeric, use subset B for the first 2 digits of the data
string, e.g. %0, followed by subset C for the rest of the barcode."

Example %008099915501071048275101276
Previously this would output
 * SUBSET B = %, length 1
 * SUBSET C = 00809991550107104827510127, length 26
 * SUBSET B = 6, length 1
Now expected outcome is
 * SUBSET B = %0, length 2
 * SUBSET C = 08099915501071048275101276, length 26
formatting
@richayles
Copy link
Author

This is to avoid two mode shifts for Barcode length optimization

This is the Wiki entry on how I understand this to work - https://en.wikipedia.org/wiki/Code_128#Barcode_length_optimization

@rlweb
Copy link

rlweb commented Dec 11, 2017

Bump :D

@casperbakker casperbakker merged commit d0afb3c into picqer:master Jan 12, 2019
@casperbakker
Copy link
Member

Thanks @rlweb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants