From 3a837b762abb68392028ee2fe939938148e59292 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Fri, 3 Jun 2011 15:24:32 -0400 Subject: [PATCH] Corrects the barcode comparisons in inventory.pl --- tools/inventory.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/inventory.pl b/tools/inventory.pl index f8903e5..ba05a1b 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -194,7 +194,7 @@ if ( ! ($uploadbarcodes && length($uploadbarcodes)>0 ) || ( $input->param('compa if ( ( ( $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; } @@ -202,7 +202,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; } -- 1.5.6.5