View | Details | Raw Unified | Return to bug 22799
Collapse All | Expand All

(-)a/tools/batchMod.pl (-3 / +10 lines)
Lines 256-262 if ($op eq "show"){ Link Here
256
        if ($filecontent eq 'barcode_file') {
256
        if ($filecontent eq 'barcode_file') {
257
            my $existing_items = Koha::Items->search({ barcode => \@contentlist });
257
            my $existing_items = Koha::Items->search({ barcode => \@contentlist });
258
            @itemnumbers = $existing_items->get_column('itemnumber');
258
            @itemnumbers = $existing_items->get_column('itemnumber');
259
            my %exists = map {$_=>1} $existing_items->get_column('barcode');
259
            my %exists = map {lc($_)=>1} $existing_items->get_column('barcode');
260
            # to avoid problems with case sensitivity
261
            foreach my $barcode (@contentlist) {
262
                $barcode = lc($barcode);
263
            }
260
            @notfoundbarcodes = grep { !$exists{$_} } @contentlist;
264
            @notfoundbarcodes = grep { !$exists{$_} } @contentlist;
261
        }
265
        }
262
        elsif ( $filecontent eq 'itemid_file') {
266
        elsif ( $filecontent eq 'itemid_file') {
Lines 277-283 if ($op eq "show"){ Link Here
277
            my $existing_items = Koha::Items->search({ barcode => \@barcodelist });
281
            my $existing_items = Koha::Items->search({ barcode => \@barcodelist });
278
            @itemnumbers = $existing_items->get_column('itemnumber');
282
            @itemnumbers = $existing_items->get_column('itemnumber');
279
            my @barcodes = $existing_items->get_column('barcode');
283
            my @barcodes = $existing_items->get_column('barcode');
280
            my %exists = map {$_=>1} @barcodes;
284
            my %exists = map {lc($_)=>1} @barcodes;
285
            # to avoid problems with case sensitivity
286
            foreach my $barcode (@barcodelist) {
287
                $barcode = lc($barcode);
288
            }
281
            @notfoundbarcodes = grep { !$exists{$_} } @barcodelist;
289
            @notfoundbarcodes = grep { !$exists{$_} } @barcodelist;
282
        }
290
        }
283
    }
291
    }
284
- 

Return to bug 22799