X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FBarcodes.pm;h=a528bd96385a824698856076bf799433be1cdbe2;hb=2bc542789fdf9d551a408bc8349daa062a37c496;hp=176d87835fa57d159e09919e946304098ce075cf;hpb=4c14cd317e92cb44aed69f09e99438f694ae32e5;p=koha_gimpoz diff --git a/C4/Barcodes.pm b/C4/Barcodes.pm index 176d87835f..a528bd9638 100644 --- a/C4/Barcodes.pm +++ b/C4/Barcodes.pm @@ -135,14 +135,11 @@ sub next_value ($;$) { # Note, this enlargement might be undesireable for some barcode formats. # Those should override next_value() to work accordingly. $incr++; - my $width = $self->width || undef; - # we would want to use %$x.$xd, but that would break on large values, like 2160700004168 - # so we let the object tell us if it has a width to focus on. If not, we use float. - my $format = ($width ? '%'."$width.$width".'d' : '%.0f'); - $debug and warn "sprintf(\"$format\",$incr)"; + + $debug and warn "$incr"; $head = $self->process_head($head,$max,$specific); $tail = $self->process_tail($tail,$max,$specific); - my $next_value = $head . sprintf($format,$incr) . $tail; + my $next_value = $head . $incr . $tail; $debug and print STDERR "( next ) max barcode found: $next_value\n"; return $next_value; }