47: open csr_unique;
48: fetch csr_unique into l_dummy;
49: if csr_unique%NOTFOUND then
50: close csr_unique;
51: fnd_message.set_name('PAY', 'PAY_KR_AEI_TYPE_UNIQUE_ERROR');
52: fnd_message.raise_error;
53: end if;
54: close csr_unique;
55: end if;
48: fetch csr_unique into l_dummy;
49: if csr_unique%NOTFOUND then
50: close csr_unique;
51: fnd_message.set_name('PAY', 'PAY_KR_AEI_TYPE_UNIQUE_ERROR');
52: fnd_message.raise_error;
53: end if;
54: close csr_unique;
55: end if;
56: end chk_information_type_unique;
648: l_effective_date := fnd_date.canonical_to_date(p_aei_information1);
649: l_year := to_char(fnd_date.canonical_to_date(p_aei_information1), 'YYYY');
650: if (fnd_number.canonical_to_number(p_aei_information2) < 2008 or
651: fnd_number.canonical_to_number(p_aei_information2) > fnd_number.canonical_to_number(l_year)) then
652: fnd_message.set_name('PAY', 'PAY_KR_TAX_PD_OUT_OF_RANGE');
653: fnd_message.raise_error;
654: end if;
655: --
656: -- Check whether the taxation_period is unique.
649: l_year := to_char(fnd_date.canonical_to_date(p_aei_information1), 'YYYY');
650: if (fnd_number.canonical_to_number(p_aei_information2) < 2008 or
651: fnd_number.canonical_to_number(p_aei_information2) > fnd_number.canonical_to_number(l_year)) then
652: fnd_message.set_name('PAY', 'PAY_KR_TAX_PD_OUT_OF_RANGE');
653: fnd_message.raise_error;
654: end if;
655: --
656: -- Check whether the taxation_period is unique.
657: --
659: fetch csr_unique into l_dummy;
660: close csr_unique;
661:
662: if l_dummy > 0 then
663: fnd_message.set_name('PAY', 'PAY_KR_TAX_PERIOD_UNIQUE_ERROR');
664: fnd_message.set_token('YEAR',p_aei_information2);
665: fnd_message.raise_error;
666: end if;
667:
660: close csr_unique;
661:
662: if l_dummy > 0 then
663: fnd_message.set_name('PAY', 'PAY_KR_TAX_PERIOD_UNIQUE_ERROR');
664: fnd_message.set_token('YEAR',p_aei_information2);
665: fnd_message.raise_error;
666: end if;
667:
668: if (fnd_number.canonical_to_number(p_aei_information3) < 0 or
661:
662: if l_dummy > 0 then
663: fnd_message.set_name('PAY', 'PAY_KR_TAX_PERIOD_UNIQUE_ERROR');
664: fnd_message.set_token('YEAR',p_aei_information2);
665: fnd_message.raise_error;
666: end if;
667:
668: if (fnd_number.canonical_to_number(p_aei_information3) < 0 or
669: fnd_number.canonical_to_number(p_aei_information4) < 0 or
667:
668: if (fnd_number.canonical_to_number(p_aei_information3) < 0 or
669: fnd_number.canonical_to_number(p_aei_information4) < 0 or
670: fnd_number.canonical_to_number(p_aei_information5) < 0 ) then
671: fnd_message.set_name('PAY' , 'PAY_KR_YEA_NEG_VAL_ERR');
672: fnd_message.raise_error;
673: end if;
674:
675: if (fnd_number.canonical_to_number(p_aei_information2) = l_year) then -- Bug 9213683
668: if (fnd_number.canonical_to_number(p_aei_information3) < 0 or
669: fnd_number.canonical_to_number(p_aei_information4) < 0 or
670: fnd_number.canonical_to_number(p_aei_information5) < 0 ) then
671: fnd_message.set_name('PAY' , 'PAY_KR_YEA_NEG_VAL_ERR');
672: fnd_message.raise_error;
673: end if;
674:
675: if (fnd_number.canonical_to_number(p_aei_information2) = l_year) then -- Bug 9213683
676: if fnd_number.canonical_to_number(p_aei_information3) > 0 then
673: end if;
674:
675: if (fnd_number.canonical_to_number(p_aei_information2) = l_year) then -- Bug 9213683
676: if fnd_number.canonical_to_number(p_aei_information3) > 0 then
677: fnd_message.set_name('PAY', 'PAY_KR_CARRY_OVER_BAL_VAL_ERR');
678: fnd_message.raise_error;
679: end if;
680: end if;
681:
674:
675: if (fnd_number.canonical_to_number(p_aei_information2) = l_year) then -- Bug 9213683
676: if fnd_number.canonical_to_number(p_aei_information3) > 0 then
677: fnd_message.set_name('PAY', 'PAY_KR_CARRY_OVER_BAL_VAL_ERR');
678: fnd_message.raise_error;
679: end if;
680: end if;
681:
682: end if;
1262: fetch csr_unique into l_dummy;
1263: close csr_unique;
1264:
1265: if l_dummy > 0 then
1266: fnd_message.set_name('PAY', 'PAY_KR_NTAX_EARN_UNIQUE_ERROR');
1267: fnd_message.set_token('NTAX_CODE',p_aei_information2);
1268: fnd_message.set_token('BUS_REG_NUM',p_aei_information4);
1269: fnd_message.raise_error;
1270: end if;
1263: close csr_unique;
1264:
1265: if l_dummy > 0 then
1266: fnd_message.set_name('PAY', 'PAY_KR_NTAX_EARN_UNIQUE_ERROR');
1267: fnd_message.set_token('NTAX_CODE',p_aei_information2);
1268: fnd_message.set_token('BUS_REG_NUM',p_aei_information4);
1269: fnd_message.raise_error;
1270: end if;
1271:
1264:
1265: if l_dummy > 0 then
1266: fnd_message.set_name('PAY', 'PAY_KR_NTAX_EARN_UNIQUE_ERROR');
1267: fnd_message.set_token('NTAX_CODE',p_aei_information2);
1268: fnd_message.set_token('BUS_REG_NUM',p_aei_information4);
1269: fnd_message.raise_error;
1270: end if;
1271:
1272: end if;
1265: if l_dummy > 0 then
1266: fnd_message.set_name('PAY', 'PAY_KR_NTAX_EARN_UNIQUE_ERROR');
1267: fnd_message.set_token('NTAX_CODE',p_aei_information2);
1268: fnd_message.set_token('BUS_REG_NUM',p_aei_information4);
1269: fnd_message.raise_error;
1270: end if;
1271:
1272: end if;
1273:
1392: l_year := to_number(to_char(l_effective_date,'YYYY'));
1393: if l_year > 2008 then
1394: --
1395: if (p_aei_information6 is null) or (p_aei_information7 is null) then
1396: fnd_message.set_name('PAY', 'PAY_KR_YEA_EDUCATION_REQ_ERR');
1397: fnd_message.raise_error;
1398: end if;
1399: --
1400: for i in csr_cont_rel_id loop
1393: if l_year > 2008 then
1394: --
1395: if (p_aei_information6 is null) or (p_aei_information7 is null) then
1396: fnd_message.set_name('PAY', 'PAY_KR_YEA_EDUCATION_REQ_ERR');
1397: fnd_message.raise_error;
1398: end if;
1399: --
1400: for i in csr_cont_rel_id loop
1401: l_cont_rel_id := i.contact_relationship_id;
1876: fetch csr into l_dummy;
1877: close csr;
1878: --
1879: if l_dummy = 'N' then
1880: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_MED_AGED_ERROR');
1881: fnd_message.set_token('DPNT_NUM',p_aei_information8);
1882: fnd_message.raise_error;
1883: end if;
1884:
1877: close csr;
1878: --
1879: if l_dummy = 'N' then
1880: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_MED_AGED_ERROR');
1881: fnd_message.set_token('DPNT_NUM',p_aei_information8);
1882: fnd_message.raise_error;
1883: end if;
1884:
1885: end if;
1878: --
1879: if l_dummy = 'N' then
1880: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_MED_AGED_ERROR');
1881: fnd_message.set_token('DPNT_NUM',p_aei_information8);
1882: fnd_message.raise_error;
1883: end if;
1884:
1885: end if;
1886:
1936: l_dup_priority := 'N' ;
1937: end if ;
1938: close csr_priority;
1939: if (l_dup_priority = 'Y') then
1940: fnd_message.set_name('PAY' , 'PAY_KR_INV_PRIORITY');
1941: fnd_message.set_token('PRIORITY',p_aei_information6);
1942: fnd_message.raise_error;
1943: end if;
1944:
1937: end if ;
1938: close csr_priority;
1939: if (l_dup_priority = 'Y') then
1940: fnd_message.set_name('PAY' , 'PAY_KR_INV_PRIORITY');
1941: fnd_message.set_token('PRIORITY',p_aei_information6);
1942: fnd_message.raise_error;
1943: end if;
1944:
1945: open csr_dup_acc_number;
1938: close csr_priority;
1939: if (l_dup_priority = 'Y') then
1940: fnd_message.set_name('PAY' , 'PAY_KR_INV_PRIORITY');
1941: fnd_message.set_token('PRIORITY',p_aei_information6);
1942: fnd_message.raise_error;
1943: end if;
1944:
1945: open csr_dup_acc_number;
1946: fetch csr_dup_acc_number into l_dup_acc_number;
1949: end if;
1950: close csr_dup_acc_number;
1951:
1952: if (l_dup_acc_number = 'Y') then
1953: fnd_message.set_name('PAY' , 'PAY_KR_INV_ACCOUNT_NUMBER');
1954: fnd_message.set_token('ACC_NUMBER',p_aei_information4);
1955: if p_information_type = 'KR_YEA_SEP_PEN_DETAILS' then
1956: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_SEP_PEN_TYPES',p_aei_information2));
1957: elsif p_information_type = 'KR_YEA_PEN_SAVING_DETAILS' then
1950: close csr_dup_acc_number;
1951:
1952: if (l_dup_acc_number = 'Y') then
1953: fnd_message.set_name('PAY' , 'PAY_KR_INV_ACCOUNT_NUMBER');
1954: fnd_message.set_token('ACC_NUMBER',p_aei_information4);
1955: if p_information_type = 'KR_YEA_SEP_PEN_DETAILS' then
1956: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_SEP_PEN_TYPES',p_aei_information2));
1957: elsif p_information_type = 'KR_YEA_PEN_SAVING_DETAILS' then
1958: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_PEN_SAVING_TYPES',p_aei_information2));
1952: if (l_dup_acc_number = 'Y') then
1953: fnd_message.set_name('PAY' , 'PAY_KR_INV_ACCOUNT_NUMBER');
1954: fnd_message.set_token('ACC_NUMBER',p_aei_information4);
1955: if p_information_type = 'KR_YEA_SEP_PEN_DETAILS' then
1956: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_SEP_PEN_TYPES',p_aei_information2));
1957: elsif p_information_type = 'KR_YEA_PEN_SAVING_DETAILS' then
1958: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_PEN_SAVING_TYPES',p_aei_information2));
1959: elsif p_information_type = 'KR_YEA_HOU_SAVING_DETAILS' then
1960: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE',p_aei_information2));
1954: fnd_message.set_token('ACC_NUMBER',p_aei_information4);
1955: if p_information_type = 'KR_YEA_SEP_PEN_DETAILS' then
1956: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_SEP_PEN_TYPES',p_aei_information2));
1957: elsif p_information_type = 'KR_YEA_PEN_SAVING_DETAILS' then
1958: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_PEN_SAVING_TYPES',p_aei_information2));
1959: elsif p_information_type = 'KR_YEA_HOU_SAVING_DETAILS' then
1960: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE',p_aei_information2));
1961: elsif p_information_type = 'KR_YEA_LT_STOCK_SAVING_DETAILS' then
1962: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_LT_STOCK_SAVING_YEAR',p_aei_information2));
1956: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_SEP_PEN_TYPES',p_aei_information2));
1957: elsif p_information_type = 'KR_YEA_PEN_SAVING_DETAILS' then
1958: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_PEN_SAVING_TYPES',p_aei_information2));
1959: elsif p_information_type = 'KR_YEA_HOU_SAVING_DETAILS' then
1960: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE',p_aei_information2));
1961: elsif p_information_type = 'KR_YEA_LT_STOCK_SAVING_DETAILS' then
1962: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_LT_STOCK_SAVING_YEAR',p_aei_information2));
1963: end if;
1964: fnd_message.raise_error;
1958: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_PEN_SAVING_TYPES',p_aei_information2));
1959: elsif p_information_type = 'KR_YEA_HOU_SAVING_DETAILS' then
1960: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE',p_aei_information2));
1961: elsif p_information_type = 'KR_YEA_LT_STOCK_SAVING_DETAILS' then
1962: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_LT_STOCK_SAVING_YEAR',p_aei_information2));
1963: end if;
1964: fnd_message.raise_error;
1965: end if;
1966: end if;
1960: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE',p_aei_information2));
1961: elsif p_information_type = 'KR_YEA_LT_STOCK_SAVING_DETAILS' then
1962: fnd_message.set_token('TYPE',hr_general.decode_lookup('KR_YEA_LT_STOCK_SAVING_YEAR',p_aei_information2));
1963: end if;
1964: fnd_message.raise_error;
1965: end if;
1966: end if;
1967: end dup_records;
1968: -------------------------------------------------------------------------------
2001:
2002: l_hou_sub_saving_limit := get_globalvalue('KR_YEA_HOUSINSAVINTYPE_HST1',fnd_date.canonical_to_date(p_aei_information1));
2003:
2004: if p_aei_information5 > l_hou_sub_saving_limit then
2005: fnd_message.set_name('PAY' , 'PAY_KR_MAX_HOU_SUB_SAVING');
2006: fnd_message.set_token('LIMIT',l_hou_sub_saving_limit);
2007: fnd_message.raise_error;
2008: end if;
2009: end if;
2002: l_hou_sub_saving_limit := get_globalvalue('KR_YEA_HOUSINSAVINTYPE_HST1',fnd_date.canonical_to_date(p_aei_information1));
2003:
2004: if p_aei_information5 > l_hou_sub_saving_limit then
2005: fnd_message.set_name('PAY' , 'PAY_KR_MAX_HOU_SUB_SAVING');
2006: fnd_message.set_token('LIMIT',l_hou_sub_saving_limit);
2007: fnd_message.raise_error;
2008: end if;
2009: end if;
2010: end housing_sub_saving_limit;
2003:
2004: if p_aei_information5 > l_hou_sub_saving_limit then
2005: fnd_message.set_name('PAY' , 'PAY_KR_MAX_HOU_SUB_SAVING');
2006: fnd_message.set_token('LIMIT',l_hou_sub_saving_limit);
2007: fnd_message.raise_error;
2008: end if;
2009: end if;
2010: end housing_sub_saving_limit;
2011: -------------------------------------------------------------------------------
2043: elsif l_curr_start_date < i.cont_start_date and l_curr_end_date > i.cont_end_date then
2044: l_flag := 'Y';
2045: end if;
2046: if l_flag = 'Y' then
2047: fnd_message.set_name('PAY' , 'PAY_KR_CONT_PD_UNIQUE_ERROR');
2048: fnd_message.set_token('START_DATE',l_curr_start_date);
2049: fnd_message.set_token('END_DATE',l_curr_end_date);
2050: fnd_message.raise_error;
2051: end if;
2044: l_flag := 'Y';
2045: end if;
2046: if l_flag = 'Y' then
2047: fnd_message.set_name('PAY' , 'PAY_KR_CONT_PD_UNIQUE_ERROR');
2048: fnd_message.set_token('START_DATE',l_curr_start_date);
2049: fnd_message.set_token('END_DATE',l_curr_end_date);
2050: fnd_message.raise_error;
2051: end if;
2052: end loop;
2045: end if;
2046: if l_flag = 'Y' then
2047: fnd_message.set_name('PAY' , 'PAY_KR_CONT_PD_UNIQUE_ERROR');
2048: fnd_message.set_token('START_DATE',l_curr_start_date);
2049: fnd_message.set_token('END_DATE',l_curr_end_date);
2050: fnd_message.raise_error;
2051: end if;
2052: end loop;
2053: end if;
2046: if l_flag = 'Y' then
2047: fnd_message.set_name('PAY' , 'PAY_KR_CONT_PD_UNIQUE_ERROR');
2048: fnd_message.set_token('START_DATE',l_curr_start_date);
2049: fnd_message.set_token('END_DATE',l_curr_end_date);
2050: fnd_message.raise_error;
2051: end if;
2052: end loop;
2053: end if;
2054: end hou_rent_contract_dates;
2356: (p_aei_information5 = '20' or p_aei_information5 = '42') and
2357: (to_number(l_year) >= 2008)) then
2358: --
2359: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2360: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_DON_ERROR');
2361: fnd_message.set_token('DPNT_NUM',p_aei_information13);
2362: fnd_message.set_token('DON_TYPE',l_donation_type);
2363: fnd_message.raise_error;
2364: --
2357: (to_number(l_year) >= 2008)) then
2358: --
2359: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2360: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_DON_ERROR');
2361: fnd_message.set_token('DPNT_NUM',p_aei_information13);
2362: fnd_message.set_token('DON_TYPE',l_donation_type);
2363: fnd_message.raise_error;
2364: --
2365: end if;
2358: --
2359: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2360: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_DON_ERROR');
2361: fnd_message.set_token('DPNT_NUM',p_aei_information13);
2362: fnd_message.set_token('DON_TYPE',l_donation_type);
2363: fnd_message.raise_error;
2364: --
2365: end if;
2366: --
2359: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2360: fnd_message.set_name('PAY', 'PAY_KR_ELIGIBLE_DON_ERROR');
2361: fnd_message.set_token('DPNT_NUM',p_aei_information13);
2362: fnd_message.set_token('DON_TYPE',l_donation_type);
2363: fnd_message.raise_error;
2364: --
2365: end if;
2366: --
2367: -- Bug 13247926
2369: and (fnd_date.canonical_to_date(p_aei_information2) > to_date('2011/06/30', 'YYYY/MM/DD'))
2370: and (to_number(l_year) >= 2011) )
2371: then
2372: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2373: fnd_message.set_name('PAY', 'PAY_KR_TAX_LAW_DON_ERROR');
2374: fnd_message.set_token('DON_TYPE',l_donation_type);
2375: fnd_message.raise_error;
2376: end if;
2377: end if;
2370: and (to_number(l_year) >= 2011) )
2371: then
2372: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2373: fnd_message.set_name('PAY', 'PAY_KR_TAX_LAW_DON_ERROR');
2374: fnd_message.set_token('DON_TYPE',l_donation_type);
2375: fnd_message.raise_error;
2376: end if;
2377: end if;
2378: --
2371: then
2372: l_donation_type := hr_general.decode_lookup('KR_YEA_DONATION_TYPE', p_aei_information5);
2373: fnd_message.set_name('PAY', 'PAY_KR_TAX_LAW_DON_ERROR');
2374: fnd_message.set_token('DON_TYPE',l_donation_type);
2375: fnd_message.raise_error;
2376: end if;
2377: end if;
2378: --
2379: end;
2404: l_flag := 'Y';
2405: end if;
2406:
2407: if l_flag = 'Y' then
2408: fnd_message.set_name('PAY' , 'PAY_KR_TAX_REDUCTION_DATE');
2409: fnd_message.raise_error;
2410: end if;
2411: end if;
2412: end chk_tax_reduction_date;
2405: end if;
2406:
2407: if l_flag = 'Y' then
2408: fnd_message.set_name('PAY' , 'PAY_KR_TAX_REDUCTION_DATE');
2409: fnd_message.raise_error;
2410: end if;
2411: end if;
2412: end chk_tax_reduction_date;
2413:
2426: l_contract_date := fnd_date.canonical_to_date(p_aei_information2);
2427: l_expiry_date := fnd_date.canonical_to_date(p_aei_information3);
2428:
2429: if l_expiry_date < l_contract_date or l_expiry_date >= c_20150101 then
2430: fnd_message.set_name('PAY' , 'PAY_KR_FW_TAX_BREAK_END_DATE');
2431: fnd_message.raise_error;
2432: end if;
2433: end if;
2434: end chk_fw_tax_reduction_date;
2427: l_expiry_date := fnd_date.canonical_to_date(p_aei_information3);
2428:
2429: if l_expiry_date < l_contract_date or l_expiry_date >= c_20150101 then
2430: fnd_message.set_name('PAY' , 'PAY_KR_FW_TAX_BREAK_END_DATE');
2431: fnd_message.raise_error;
2432: end if;
2433: end if;
2434: end chk_fw_tax_reduction_date;
2435: -------------------------------------------------------------------------------------------------