|
Lines 101-106
my @field_check=split(/\|/,$check_BorrowerMandatoryField);
Link Here
|
| 101 |
foreach (@field_check) { |
101 |
foreach (@field_check) { |
| 102 |
$template->param( "mandatory$_" => 1); |
102 |
$template->param( "mandatory$_" => 1); |
| 103 |
} |
103 |
} |
|
|
104 |
# we'll need this, later. |
| 105 |
my $dateofbirthmandatory = (scalar grep {$_ eq "dateofbirth"} @field_check) ? 1 : 0; |
| 104 |
# function to designate unwanted fields |
106 |
# function to designate unwanted fields |
| 105 |
my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField"); |
107 |
my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField"); |
| 106 |
@field_check=split(/\|/,$check_BorrowerUnwantedField); |
108 |
@field_check=split(/\|/,$check_BorrowerUnwantedField); |
|
Lines 264-270
if ($op eq 'save' || $op eq 'insert'){
Link Here
|
| 264 |
if (checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){ |
266 |
if (checkcardnumber($newdata{cardnumber},$newdata{borrowernumber})){ |
| 265 |
push @errors, 'ERROR_cardnumber'; |
267 |
push @errors, 'ERROR_cardnumber'; |
| 266 |
} |
268 |
} |
| 267 |
my $dateofbirthmandatory = (scalar grep {$_ eq "dateofbirth"} @field_check) ? 1 : 0; |
|
|
| 268 |
if ($newdata{dateofbirth} && $dateofbirthmandatory) { |
269 |
if ($newdata{dateofbirth} && $dateofbirthmandatory) { |
| 269 |
my $age = GetAge($newdata{dateofbirth}); |
270 |
my $age = GetAge($newdata{dateofbirth}); |
| 270 |
my $borrowercategory=GetBorrowercategory($newdata{'categorycode'}); |
271 |
my $borrowercategory=GetBorrowercategory($newdata{'categorycode'}); |
| 271 |
- |
|
|