Lines 218-230
if ($op eq "show"){
Link Here
|
218 |
@contentlist = grep /\S/, ( map { split /[$split_chars]/ } @contentlist ); |
218 |
@contentlist = grep /\S/, ( map { split /[$split_chars]/ } @contentlist ); |
219 |
@contentlist = uniq @contentlist; |
219 |
@contentlist = uniq @contentlist; |
220 |
# Note: adding lc for case insensitivity |
220 |
# Note: adding lc for case insensitivity |
221 |
my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@contentlist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; |
221 |
my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => { -in => \@contentlist } }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; |
222 |
@itemnumbers = map { exists $itemdata{lc $_} ? $itemdata{lc $_} : () } @contentlist; |
222 |
@itemnumbers = map { exists $itemdata{lc $_} ? $itemdata{lc $_} : () } @contentlist; |
223 |
@notfoundbarcodes = grep { !exists $itemdata{lc $_} } @contentlist; |
223 |
@notfoundbarcodes = grep { !exists $itemdata{lc $_} } @contentlist; |
224 |
} |
224 |
} |
225 |
elsif ( $filecontent eq 'itemid_file') { |
225 |
elsif ( $filecontent eq 'itemid_file') { |
226 |
@contentlist = uniq @contentlist; |
226 |
@contentlist = uniq @contentlist; |
227 |
my %itemdata = map { $_->{itemnumber} => 1 } @{ Koha::Items->search({ itemnumber => \@contentlist }, { columns => [ 'itemnumber' ] } )->unblessed }; |
227 |
my %itemdata = map { $_->{itemnumber} => 1 } @{ Koha::Items->search({ itemnumber => { -in => \@contentlist } }, { columns => [ 'itemnumber' ] } )->unblessed }; |
228 |
@itemnumbers = grep { exists $itemdata{$_} } @contentlist; |
228 |
@itemnumbers = grep { exists $itemdata{$_} } @contentlist; |
229 |
@notfounditemnumbers = grep { !exists $itemdata{$_} } @contentlist; |
229 |
@notfounditemnumbers = grep { !exists $itemdata{$_} } @contentlist; |
230 |
} |
230 |
} |
Lines 240-246
if ($op eq "show"){
Link Here
|
240 |
@barcodelist = map { barcodedecode( $_ ) } @barcodelist; |
240 |
@barcodelist = map { barcodedecode( $_ ) } @barcodelist; |
241 |
|
241 |
|
242 |
# Note: adding lc for case insensitivity |
242 |
# Note: adding lc for case insensitivity |
243 |
my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => \@barcodelist }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; |
243 |
my %itemdata = map { lc($_->{barcode}) => $_->{itemnumber} } @{ Koha::Items->search({ barcode => { -in => \@barcodelist } }, { columns => [ 'itemnumber', 'barcode' ] } )->unblessed }; |
244 |
@itemnumbers = map { exists $itemdata{lc $_} ? $itemdata{lc $_} : () } @barcodelist; |
244 |
@itemnumbers = map { exists $itemdata{lc $_} ? $itemdata{lc $_} : () } @barcodelist; |
245 |
@notfoundbarcodes = grep { !exists $itemdata{lc $_} } @barcodelist; |
245 |
@notfoundbarcodes = grep { !exists $itemdata{lc $_} } @barcodelist; |
246 |
} |
246 |
} |
247 |
- |
|
|