DBA Data[Home] [Help]

APPS.PER_CN_VALIDATIONS_PKG dependencies on HR_UTILITY

Line 49: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.calculate_check_digit',1);

45: l_weight number :=0;
46: l_sum number :=0;
47: l_chk_dgt number :=0;
48: begin
49: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.calculate_check_digit',1);
50: for l_pos in 2 .. 18
51: loop
52: l_digit := to_number(substr(p_national_identifier,19 - l_pos,1)) ;
53: l_weight := weight(l_pos);

Line 55: -- hr_utility.trace('taking the digit'||l_digit||'at pos '||l_pos||' and weight is'||l_weight||'and sum'||l_sum);

51: loop
52: l_digit := to_number(substr(p_national_identifier,19 - l_pos,1)) ;
53: l_weight := weight(l_pos);
54: l_sum := MOD(l_sum + l_digit * l_weight,11 );
55: -- hr_utility.trace('taking the digit'||l_digit||'at pos '||l_pos||' and weight is'||l_weight||'and sum'||l_sum);
56: end loop;
57:
58: l_chk_dgt := MOD(12 - l_sum,11);
59: hr_utility.trace('The check digit is '||l_chk_dgt);

Line 59: hr_utility.trace('The check digit is '||l_chk_dgt);

55: -- hr_utility.trace('taking the digit'||l_digit||'at pos '||l_pos||' and weight is'||l_weight||'and sum'||l_sum);
56: end loop;
57:
58: l_chk_dgt := MOD(12 - l_sum,11);
59: hr_utility.trace('The check digit is '||l_chk_dgt);
60: if (l_chk_dgt < 10 ) then
61: return to_char(l_chk_dgt);
62: else
63: return 'X';

Line 65: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.calculate_check_digit',2);

61: return to_char(l_chk_dgt);
62: else
63: return 'X';
64: end if;
65: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.calculate_check_digit',2);
66: end calculate_check_digit;
67:
68:
69: --This function used to validate the national Identifier number entered

Line 88: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.validate_national_identifier',1);

84: l_ni_chk_dgt char;
85:
86:
87: Begin
88: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.validate_national_identifier',1);
89: l_status := 0;
90: if ( length(p_national_identifier) = 18 ) then
91: begin
92: l_gender :=mod( to_number(substr(p_national_identifier,17,1)),2);

Line 108: hr_utility.trace('NI'||l_gender||'dob'||l_ni_dob||'chk'||l_ni_chk_dgt);

104: l_cal_chk_dgt :=null;
105: end;
106: end if;
107:
108: hr_utility.trace('NI'||l_gender||'dob'||l_ni_dob||'chk'||l_ni_chk_dgt);
109: hr_utility.trace('EN'||p_gender||'dob'||l_entered_dob||'chk'||l_cal_chk_dgt);
110: -- Check for mismatch between gender entered and gender given in NI no.
111: if ( ( l_gender = 0 AND p_gender = 'M' ) OR ( l_gender = 1 AND p_gender = 'F' )) then
112: l_status := -1;

Line 109: hr_utility.trace('EN'||p_gender||'dob'||l_entered_dob||'chk'||l_cal_chk_dgt);

105: end;
106: end if;
107:
108: hr_utility.trace('NI'||l_gender||'dob'||l_ni_dob||'chk'||l_ni_chk_dgt);
109: hr_utility.trace('EN'||p_gender||'dob'||l_entered_dob||'chk'||l_cal_chk_dgt);
110: -- Check for mismatch between gender entered and gender given in NI no.
111: if ( ( l_gender = 0 AND p_gender = 'M' ) OR ( l_gender = 1 AND p_gender = 'F' )) then
112: l_status := -1;
113: -- Check for mismatch between dob entered and dob given in NI no.

Line 122: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.validate_national_identifier',1);

118: elsif ( nvl(l_ni_chk_dgt,'#') <> nvl( l_cal_chk_dgt, '#' )) then
119: l_status := -3;
120: end if;
121:
122: hr_utility.set_location('PER_CN_VALIDATIONS_PKG.validate_national_identifier',1);
123: -- If there is an error then l_stauts will be less than zero else it will be zero.
124: return l_status;
125:
126: End validate_national_identifier;