This commit is contained in:
tipaul 2003-11-28 12:51:26 +00:00
parent efebff07f4
commit 582a7ec8b2
3 changed files with 19 additions and 8 deletions

View file

@ -89,7 +89,14 @@ if ($missing !=1) {
$data{'cardnumber_institution'} = C4::Members::fixup_cardnumber
($data{'cardnumber_institution'});
my $valid=checkdigit(\%env,$data{"cardnumber_institution"});
#check cardnumber is valid
my $nounique;
if ( $data{'type'} ne "Add" ) {
$nounique = 0;
} else {
$nounique = 1;
}
my $valid=checkdigit(\%env,$data{'cardnumber'}, $nounique);
$template->param( invalid => ($valid !=1));

View file

@ -88,7 +88,14 @@ for (my $i=0;$i<3;$i++){
$string.=" Gender <br>";
$missing=1;
}
my $valid=checkdigit(\%env,$data{"cardnumber_child_$i"});
#check cardnumber is valid
my $nounique;
if ( $data{'type'} ne "Add" ) {
$nounique = 0;
} else {
$nounique = 1;
}
my $valid=checkdigit(\%env,$data{'cardnumber'}, $nounique);
if ($valid != 1){
$string.=" Invalid Cardnumber $number<br>";
$missing=1;

View file

@ -77,13 +77,10 @@ if ($data{'cardnumber'} eq ''){
} else {
#check cardnumber is valid
my $nounique;
if ( $data{'type'} ne "Add" )
{
$nounique = 1;
}
else
{
if ( $data{'type'} ne "Add" ) {
$nounique = 0;
} else {
$nounique = 1;
}
my $valid=checkdigit(\%env,$data{'cardnumber'}, $nounique);
if ($valid != 1){