[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:
Lucas Perais (lpe)
2017-06-16 08:41:58 +02:00
parent d771f612b4
commit bf5312428f
@@ -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);
},