Skip to content

Write Code 11 check digit K as a dash when the value is 10 - #215

Open
SashaMIT wants to merge 1 commit into
milon:masterfrom
SashaMIT:codered-code11-k-digit
Open

SashaMIT wants to merge 1 commit into
milon:masterfrom
SashaMIT:codered-code11-k-digit

Conversation

@SashaMIT

Copy link
Copy Markdown

Code 11 check digit C already turns a value of 10 into -. Check digit K appended the integer 10, which is the two characters 1 and 0, and the stop code was left off.

00000000007 has C = 7 and K = 10. The bars were S00000000007710. They should be S000000000077-S. A value of K from 0 through 9 is unchanged: 00000000001 is still S0000000000113S.

The new case failed on master (S000000000077-S versus S00000000007710) and passes once K uses the same dash as C.

Test plan

  • vendor/bin/phpunit --filter DNS1DTest (7 tests, 21 assertions)

Made with Cursor

The C digit already used a dash. K was appended as the two characters 10, and the stop code was left off.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant