[FIX] barcodes: comply the ean parser with reportlab.graphics.barcode
Before this commit, the JS parser would add 0 after the input, then add the ean key. Whereas reportlab.graphics.barcode fills the input with 0's on the left, then add the key http://pydoc.net/Python/reportlab/2.5/reportlab.graphics.barcode.eanbc/ At: Ean13BarcodeWidget.__init__() This commit makes the ean parser coherent with the lib the python uses
This commit is contained in:
@@ -102,7 +102,7 @@ var BarcodeParser = Class.extend({
|
||||
ean = ean.substr(0,13);
|
||||
|
||||
for(var n = 0, count = (13 - ean.length); n < count; n++){
|
||||
ean = ean + '0';
|
||||
ean = '0' + ean;
|
||||
}
|
||||
return ean.substr(0,12) + this.ean_checksum(ean);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user