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

12 digit UPC-A code generating error #150

Closed
vishakha-simply opened this issue Mar 22, 2022 · 1 comment
Closed

12 digit UPC-A code generating error #150

vishakha-simply opened this issue Mar 22, 2022 · 1 comment

Comments

@vishakha-simply
Copy link

vishakha-simply commented Mar 22, 2022

Hello
I'm trying to create a upc-A barcode with the standard 12 digits but it produces an error on some range of barcodes, scans others perfectly

An error happened (Picqer\Barcode\Exceptions\InvalidCheckDigitException):

The checksum is not calculated properly and produces an error on some barcodes
image

@casperbakker
Copy link
Member

That means that the data you provided is not valid. The last part of the barcode is the 'checksum', a check if the barcode is rightly encoded. If you provide the data without the checksum, this library will calculate the checksum for you. But if you provide the data including the checksum, we will check that the checksum is right. Otherwise the resulting barcode will be invalid.

If you believe the checksum calculation is wrong, please provide complete examples and the results you were expecting.

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

No branches or pull requests

2 participants