Lines 245-259
if ($op eq "show"){
Link Here
|
245 |
|
245 |
|
246 |
@contentlist = uniq @contentlist; |
246 |
@contentlist = uniq @contentlist; |
247 |
if ($filecontent eq 'barcode_file') { |
247 |
if ($filecontent eq 'barcode_file') { |
248 |
foreach my $barcode (@contentlist) { |
248 |
my $existing_items = Koha::Items->search({ itemnumber => \@contentlist }); |
249 |
|
249 |
@itemnumbers = $existing_items->get_column('itemnumber'); |
250 |
my $itemnumber = GetItemnumberFromBarcode($barcode); |
250 |
my %exists = map {$_=>1} @{$existing_items->get_column('barcode')}; |
251 |
if ($itemnumber) { |
251 |
@notfoundbarcodes = grep { !$exists{$_} } @contentlist; |
252 |
push @itemnumbers,$itemnumber; |
|
|
253 |
} else { |
254 |
push @notfoundbarcodes, $barcode; |
255 |
} |
256 |
} |
257 |
} |
252 |
} |
258 |
elsif ( $filecontent eq 'itemid_file') { |
253 |
elsif ( $filecontent eq 'itemid_file') { |
259 |
@itemnumbers = Koha::Items->search({ itemnumber => \@contentlist })->get_column('itemnumber'); |
254 |
@itemnumbers = Koha::Items->search({ itemnumber => \@contentlist })->get_column('itemnumber'); |
Lines 270-285
if ($op eq "show"){
Link Here
|
270 |
if ( my $list=$input->param('barcodelist')){ |
265 |
if ( my $list=$input->param('barcodelist')){ |
271 |
push my @barcodelist, uniq( split(/\s\n/, $list) ); |
266 |
push my @barcodelist, uniq( split(/\s\n/, $list) ); |
272 |
|
267 |
|
273 |
foreach my $barcode (@barcodelist) { |
268 |
my $existing_items = Koha::Items->search({ barcode => \@barcodelist }); |
274 |
|
269 |
@itemnumbers = $existing_items->get_column('itemnumber'); |
275 |
my $itemnumber = GetItemnumberFromBarcode($barcode); |
270 |
my %exists = map {$_=>1} @{$existing_items->get_column('barcode')}; |
276 |
if ($itemnumber) { |
271 |
@notfoundbarcodes = grep { !$exists{$_} } @barcodelist; |
277 |
push @itemnumbers,$itemnumber; |
|
|
278 |
} else { |
279 |
push @notfoundbarcodes, $barcode; |
280 |
} |
281 |
} |
282 |
|
283 |
} |
272 |
} |
284 |
} |
273 |
} |
285 |
|
274 |
|
286 |
- |
|
|