fix for #564
This commit is contained in:
parent
efebff07f4
commit
582a7ec8b2
3 changed files with 19 additions and 8 deletions
|
@ -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));
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue