Bug 43650: incremental EAN-13 barcodes produce unexpected sequence
When incremental EAN-13 barcodes are selected for autoBarcode and new item records are created an unexpected sequence of barcode numbers is produced instead of a sequence where the barcode is incremented by 1 between each item. This patch fixes that by adding quote marks in the inline JS, thus treating the barcode as a string rather than an integer :+) Test plan: 1. have records imported from somewhere but with no items 2. autoBarcode set to incremental EAN-13 barcodes 3. create a number of new items 4. observe that the item barcodes don't follow the expected sequence 5. apply patch 6. delete item records 7. repeat step 3 8. observe that the item barcodes follow the expected sequence Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
e1e08a7f5d
commit
a86b7a063d
|
|
@ -77,7 +77,7 @@ if (\$('#' + id).val() == '' || force) {
|
|||
\$('#' + id).val(prefix + '-' + newNumberStr);
|
||||
}
|
||||
else if ( autobarcodetype == "EAN13" ) {
|
||||
\$('#' + id).val(incrementEAN13($nextnum, offset));
|
||||
\$('#' + id).val(incrementEAN13('$nextnum', offset));
|
||||
}
|
||||
else if ( incremental_barcode ) {
|
||||
\$('#' + id).val($nextnum + offset);
|
||||
|
|
|
|||
Loading…
Reference in New Issue