@@ -, +, @@ branchcode - It's a bit complicated. You need - all your branchcodes to be numerics (01,02,71...) - all barcodes to already be a bunch of numbers - Modify the syspref 'autobarcode' to hbyymmincr, the home branch + date one. - Find an item in the pro-search, - New -> New Item - Click on the 'p' to have the value builder create the next barcode. - Without the patch, the query won't have found anything, so it'll suggest xxxxxx0001 - Click Add. It reprensent the form to enter another one. - Click on the 'p' edit box, it'll offer you again xxxxxx0001 --- C4/Barcodes/ValueBuilder.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/C4/Barcodes/ValueBuilder.pm +++ a/C4/Barcodes/ValueBuilder.pm @@ -49,7 +49,7 @@ sub get_barcode { my $month = $args->{mon}; my $query = "SELECT MAX(CAST(SUBSTRING(barcode,-4) AS signed)) AS number FROM items WHERE barcode REGEXP ?"; my $sth = C4::Context->dbh->prepare($query); - $sth->execute("^[-a-zA-Z]{1,}$year$month"); + $sth->execute("^[-a-zA-Z0-9]{1,}$year$month"); while (my ($count)= $sth->fetchrow_array) { $nextnum = $count if $count; $nextnum = 0 if $nextnum == 9999; # this sequence only allows for cataloging 9999 items per month --