Pass errors callback function
Closed this issue · 7 comments
Please consider to pass errors to error callback function.
Getting problem for some numbers like this "400005498004". Does not give output
EAN13 barcodes need a number with 13 digits. Your number only has 12.
Hi,
I checked the source code, hope the following code at line 14 in common.coffee which is already included should create the check digit.
if @number.length == 12
checkDigit = @generateCheckDigit(@number)
@number+=checkDigit
And its working for my other 12 digit keys (Have a look at my actual code below)
var barcodeOptions = {color:"#333",prefix:true,number:true,};
new EAN13(document.querySelector('#ticket1barcode'), '445003517032', barcodeOptions);
new EAN13(document.querySelector('#ticket2barcode'), '445003518032', barcodeOptions);
new EAN13(document.querySelector('#ticket3barcode'), '445003519032', barcodeOptions);
new EAN13(document.querySelector('#ticket4barcode'), '445003520032', barcodeOptions);
new EAN13(document.querySelector('#ticket5barcode'), '445003521032', barcodeOptions);
new EAN13(document.querySelector('#ticket6barcode'), '445003522032', barcodeOptions);
new EAN13(document.querySelector('#ticket7barcode'), '445003523032', barcodeOptions);
new EAN13(document.querySelector('#ticket8barcode'), '445003524032', barcodeOptions);
new EAN13(document.querySelector('#ticket9barcode'), '445003525032', barcodeOptions);
new EAN13(document.querySelector('#ticket10barcode'), '445003526032', barcodeOptions);
And here I don't get output only for 445003520032.
It seems its not working when check digit is zero.
Sorry, you're right. I forgot about this feature myself. ;)
44c83f6 should fix it for you.
Thanns Johannes. The commit worked for me :)
Hi,
commit 42c7e22 is not resembling in distribution files.
Please check line number 25 in ean13.js and line number 23 in jquery-ean13.js
I now moved the release files to the release area. I had problems with this before. Thank you!