This results in leading zeros being trimmed
Created attachment 3048 [details] [review] Proposed Patch
I have tested this patch, Before patch ok 32 - (incremental ) Barcode Creation : new(incremental) ok 33 - (incremental ) autoBarcode() : incremental ok 34 - (incremental ) initial() : 0000001 # . (incremental ) db_max() : 0000001 ok 35 - (incremental ) max() : 2 ok 36 - (incremental ) value() : 2 After patch ok 32 - (incremental ) Barcode Creation : new(incremental) ok 33 - (incremental ) autoBarcode() : incremental ok 34 - (incremental ) initial() : 0000001 # . (incremental ) db_max() : 0000001 ok 35 - (incremental ) max() : 0000002 ok 36 - (incremental ) value() : 0000002 I also checked the annual ones Before ok 2 - (annual ) Barcode Creation : new(annual) ok 3 - (annual ) autoBarcode() : annual ok 4 - (annual ) initial() : 2011-0001 # . (annual ) db_max() : 2011-18918291 ok 5 - (annual ) max() : 2011-18918292 ok 6 - (annual ) value() : 2011-18918292 after ok 2 - (annual ) Barcode Creation : new(annual) ok 3 - (annual ) autoBarcode() : annual ok 4 - (annual ) initial() : 2011-0001 # . (annual ) db_max() : 2011-18918291 ok 5 - (annual ) max() : 2011-18918292 ok 6 - (annual ) value() : 2011-18918292 So patch does what it says it does, and does fix the stripping of leading zeros Will sign off
Created attachment 3049 [details] [review] Signed off patch
Pushed, please test