@@ -, +, @@ when entering barcodes --- tools/batchMod.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -257,7 +257,11 @@ if ($op eq "show"){ my $existing_items = Koha::Items->search({ barcode => \@contentlist }); @itemnumbers = $existing_items->get_column('itemnumber'); my %exists = map {$_=>1} $existing_items->get_column('barcode'); - @notfoundbarcodes = grep { !$exists{$_} } @contentlist; + # to avoid problems with case sensitivity + foreach my $barcode (@contentlist) { + $barcode = lc($barcode); + } + @notfoundbarcodes = grep { !$exists{lc($_)} } @contentlist; } elsif ( $filecontent eq 'itemid_file') { @itemnumbers = Koha::Items->search({ itemnumber => \@contentlist })->get_column('itemnumber'); @@ -278,7 +282,11 @@ if ($op eq "show"){ @itemnumbers = $existing_items->get_column('itemnumber'); my @barcodes = $existing_items->get_column('barcode'); my %exists = map {$_=>1} @barcodes; - @notfoundbarcodes = grep { !$exists{$_} } @barcodelist; + # to avoid problems with case sensitivity + foreach my $barcode (@barcodelist) { + $barcode = lc($barcode); + } + @notfoundbarcodes = grep { !$exists{lc($_)} } @barcodelist; } } --