From 59c42cd7f32006797eeb92c39af64c1fafc41a8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Fri, 3 Jun 2011 15:24:32 -0400 Subject: [PATCH] Bug 6453 Corrects the barcode comparisons in inventory.pl Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack --- tools/inventory.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/inventory.pl b/tools/inventory.pl index 7ca8bafe7c..5e7b198af7 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -196,7 +196,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa if ( defined $input->param('compareinv2barcd') && ( ( $input->param('compareinv2barcd') eq 'on' ) && ( scalar @brcditems != scalar @$res ) ) && length($uploadbarcodes) > 0 ){ if ( scalar @brcditems > scalar @$res ){ for my $brcditem (@brcditems) { - if (! grep(/$brcditem->{barcode}/, @$res) ){ + if (! grep( $_->{barcode} =~ /$brcditem->{barcode}/ , @$res) ){ $brcditem->{notfoundkoha} = 1; push @$res, $brcditem; } @@ -204,7 +204,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa } else { my @notfound; for my $item (@$res) { - if ( ! grep(/$item->{barcode}/, @brcditems) ){ + if ( ! grep( $_->{barcode} =~ /$item->{barcode}/ , @brcditems) ){ $item->{notfoundbarcode} = 1; push @notfound, $item; } -- 2.39.5