From 9fb2d09ffc0d2de1235356b6f5394b5329c4f8c2 Mon Sep 17 00:00:00 2001 From: MJ Ray Date: Tue, 5 May 2009 16:52:47 +0100 Subject: [PATCH] Allow autogenerated cardnumbers again to solve http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2287 Signed-off-by: Galen Charlton --- tools/import_borrowers.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/import_borrowers.pl b/tools/import_borrowers.pl index 662dfccfcf..9ac994bc75 100755 --- a/tools/import_borrowers.pl +++ b/tools/import_borrowers.pl @@ -129,7 +129,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { push @feedback, {feedback=>1, name=>'headerrow', value=>join(', ', @csvcolumns)}; my $today_iso = C4::Dates->new()->output('iso'); - my @criticals = qw(cardnumber surname categorycode); # there probably should be others + my @criticals = qw(surname branchcode categorycode); # there probably should be others my @bad_dates; # I've had a few. my $date_re = C4::Dates->new->regexp('syspref'); my $iso_re = C4::Dates->new->regexp('iso'); @@ -206,7 +206,7 @@ if ( $uploadborrowers && length($uploadborrowers) > 0 ) { $borrower{dateexpiry} = GetExpiryDate($borrower{categorycode},$borrower{dateenrolled}) unless $borrower{dateexpiry}; my $borrowernumber; my $member; - if ($matchpoint eq 'cardnumber') { + if ( ($matchpoint eq 'cardnumber') && ($borrower{'cardnumber'}) ) { $member = GetMember( $borrower{'cardnumber'}, 'cardnumber' ); if ($member) { $borrowernumber = $member->{'borrowernumber'}; -- 2.39.5