613: NULL;
614: else
615: if l_location_id <> p_new_location_id then
616: check_payroll_enabled := 0;
617: fnd_message.set_name ('PAY', 'PAY_52282_FUTR_LOC_CHNG_EXISTS');
618: fnd_message.set_token('current_location_id',p_new_location_code);
619: app_exception.raise_exception; /* raise error message */
620: else
621: check_payroll_enabled := 1;
614: else
615: if l_location_id <> p_new_location_id then
616: check_payroll_enabled := 0;
617: fnd_message.set_name ('PAY', 'PAY_52282_FUTR_LOC_CHNG_EXISTS');
618: fnd_message.set_token('current_location_id',p_new_location_code);
619: app_exception.raise_exception; /* raise error message */
620: else
621: check_payroll_enabled := 1;
622: end if;
635: exit;
636: else
637: if l_location_id <> p_new_location_id then
638: check_payroll_enabled := 0;
639: fnd_message.set_name ('PAY', 'PAY_52282_FUTR_LOC_CHNG_EXISTS');
640: fnd_message.set_token('current_location_id',p_new_location_code);
641: app_exception.raise_exception; /* raise error message */
642: close csr_get_next_locations;
643: exit;
636: else
637: if l_location_id <> p_new_location_id then
638: check_payroll_enabled := 0;
639: fnd_message.set_name ('PAY', 'PAY_52282_FUTR_LOC_CHNG_EXISTS');
640: fnd_message.set_token('current_location_id',p_new_location_code);
641: app_exception.raise_exception; /* raise error message */
642: close csr_get_next_locations;
643: exit;
644: end if;
667: -- This is being added as part of SUI Wage Base Override enh
668: -- Turning Off SUI Wage Base Override Functionality due to Bug# 5486281
669: /*
670: if l_work_state_code <> l_new_work_state_code then
671: fnd_message.set_name('PAY', 'PAY_52388_SUI_TAX_LOC_CHNG') ;
672: l_returned_warning1 := fnd_message.get ;
673: end if ;
674: */
675:
668: -- Turning Off SUI Wage Base Override Functionality due to Bug# 5486281
669: /*
670: if l_work_state_code <> l_new_work_state_code then
671: fnd_message.set_name('PAY', 'PAY_52388_SUI_TAX_LOC_CHNG') ;
672: l_returned_warning1 := fnd_message.get ;
673: end if ;
674: */
675:
676: open csr_chk_fed_row;
695: fetch csr_chk_payroll into l_code;
696:
697: if csr_chk_payroll%FOUND then
698: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - payroll found',5);
699: fnd_message.set_name ('PAY', 'PAY_52232_TAX_LOC_CHNG');
700: l_returned_warning := fnd_message.get;
701: close csr_chk_payroll;
702: else
703: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - No payroll run',6);
696:
697: if csr_chk_payroll%FOUND then
698: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - payroll found',5);
699: fnd_message.set_name ('PAY', 'PAY_52232_TAX_LOC_CHNG');
700: l_returned_warning := fnd_message.get;
701: close csr_chk_payroll;
702: else
703: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - No payroll run',6);
704: fnd_message.set_name ('PAY', 'PAY_52233_TAX_LOC_CHNG_OVRD');
700: l_returned_warning := fnd_message.get;
701: close csr_chk_payroll;
702: else
703: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - No payroll run',6);
704: fnd_message.set_name ('PAY', 'PAY_52233_TAX_LOC_CHNG_OVRD');
705: l_returned_warning := fnd_message.get;
706: close csr_chk_payroll;
707: end if; /* End csr_chk_payroll%found */
708: end if; /* End check_payroll_run_enabled=1 */
701: close csr_chk_payroll;
702: else
703: hr_utility.set_location('pay_us_emp_tax_rules.check_payroll_run - No payroll run',6);
704: fnd_message.set_name ('PAY', 'PAY_52233_TAX_LOC_CHNG_OVRD');
705: l_returned_warning := fnd_message.get;
706: close csr_chk_payroll;
707: end if; /* End csr_chk_payroll%found */
708: end if; /* End check_payroll_run_enabled=1 */
709: else
1518: open chk_ins_sd;
1519: fetch chk_ins_sd into l_code;
1520:
1521: if chk_ins_sd%FOUND then
1522: fnd_message.set_name ('PAY', 'PAY_52300_TAX_SD_ASGN');
1523: fnd_message.raise_error;
1524: end if;
1525:
1526: close chk_ins_sd;
1519: fetch chk_ins_sd into l_code;
1520:
1521: if chk_ins_sd%FOUND then
1522: fnd_message.set_name ('PAY', 'PAY_52300_TAX_SD_ASGN');
1523: fnd_message.raise_error;
1524: end if;
1525:
1526: close chk_ins_sd;
1527:
1530: open chk_upd_sd;
1531: fetch chk_upd_sd into l_code;
1532:
1533: if chk_upd_sd%FOUND then
1534: fnd_message.set_name ('PAY', 'PAY_52300_TAX_SD_ASGN');
1535: fnd_message.raise_error;
1536: end if;
1537:
1538: close chk_upd_sd;
1531: fetch chk_upd_sd into l_code;
1532:
1533: if chk_upd_sd%FOUND then
1534: fnd_message.set_name ('PAY', 'PAY_52300_TAX_SD_ASGN');
1535: fnd_message.raise_error;
1536: end if;
1537:
1538: close chk_upd_sd;
1539:
1577: l_curr_eff_start_dt,
1578: l_curr_eff_end_dt;
1579:
1580: if csr_get_curr_loc%NOTFOUND then
1581: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1582: fnd_message.set_token('PROCEDURE',
1583: 'pay_us_emp_dt_tax_rules.check_locations');
1584: fnd_message.set_token('STEP','1');
1585: fnd_message.raise_error;
1578: l_curr_eff_end_dt;
1579:
1580: if csr_get_curr_loc%NOTFOUND then
1581: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1582: fnd_message.set_token('PROCEDURE',
1583: 'pay_us_emp_dt_tax_rules.check_locations');
1584: fnd_message.set_token('STEP','1');
1585: fnd_message.raise_error;
1586: close csr_get_curr_loc;
1580: if csr_get_curr_loc%NOTFOUND then
1581: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1582: fnd_message.set_token('PROCEDURE',
1583: 'pay_us_emp_dt_tax_rules.check_locations');
1584: fnd_message.set_token('STEP','1');
1585: fnd_message.raise_error;
1586: close csr_get_curr_loc;
1587:
1588: end if;
1581: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1582: fnd_message.set_token('PROCEDURE',
1583: 'pay_us_emp_dt_tax_rules.check_locations');
1584: fnd_message.set_token('STEP','1');
1585: fnd_message.raise_error;
1586: close csr_get_curr_loc;
1587:
1588: end if;
1589:
1878:
1879: if p_state_code is not null and p_county_code is null
1880: and p_city_code is null then
1881:
1882: fnd_message.set_name('PAY', 'PAY_52293_TAX_STDEL_LOC');
1883: fnd_message.raise_error;
1884:
1885: elsif p_state_code is not null and p_county_code is not null
1886: and p_city_code is null then
1879: if p_state_code is not null and p_county_code is null
1880: and p_city_code is null then
1881:
1882: fnd_message.set_name('PAY', 'PAY_52293_TAX_STDEL_LOC');
1883: fnd_message.raise_error;
1884:
1885: elsif p_state_code is not null and p_county_code is not null
1886: and p_city_code is null then
1887:
1884:
1885: elsif p_state_code is not null and p_county_code is not null
1886: and p_city_code is null then
1887:
1888: fnd_message.set_name('PAY', 'PAY_52294_TAX_CODEL_LOC');
1889: fnd_message.raise_error;
1890:
1891: elsif p_state_code is not null and p_county_code is not null
1892: and p_city_code is not null then
1885: elsif p_state_code is not null and p_county_code is not null
1886: and p_city_code is null then
1887:
1888: fnd_message.set_name('PAY', 'PAY_52294_TAX_CODEL_LOC');
1889: fnd_message.raise_error;
1890:
1891: elsif p_state_code is not null and p_county_code is not null
1892: and p_city_code is not null then
1893:
1890:
1891: elsif p_state_code is not null and p_county_code is not null
1892: and p_city_code is not null then
1893:
1894: fnd_message.set_name('PAY', 'PAY_52295_TAX_CIEL_LOC');
1895: fnd_message.raise_error;
1896:
1897: end if;
1898:
1891: elsif p_state_code is not null and p_county_code is not null
1892: and p_city_code is not null then
1893:
1894: fnd_message.set_name('PAY', 'PAY_52295_TAX_CIEL_LOC');
1895: fnd_message.raise_error;
1896:
1897: end if;
1898:
1899: elsif l_ret_code = 2 then
1900:
1901: if p_state_code is not null and p_county_code is null
1902: and p_city_code is null then
1903:
1904: fnd_message.set_name('PAY', 'PAY_76860_TAX_STDEL_TAX_LOC');
1905: fnd_message.raise_error;
1906:
1907: elsif p_state_code is not null and p_county_code is not null
1908: and p_city_code is null then
1901: if p_state_code is not null and p_county_code is null
1902: and p_city_code is null then
1903:
1904: fnd_message.set_name('PAY', 'PAY_76860_TAX_STDEL_TAX_LOC');
1905: fnd_message.raise_error;
1906:
1907: elsif p_state_code is not null and p_county_code is not null
1908: and p_city_code is null then
1909:
1906:
1907: elsif p_state_code is not null and p_county_code is not null
1908: and p_city_code is null then
1909:
1910: fnd_message.set_name('PAY', 'PAY_76861_TAX_CODEL_TAX_LOC');
1911: fnd_message.raise_error;
1912:
1913: elsif p_state_code is not null and p_county_code is not null
1914: and p_city_code is not null then
1907: elsif p_state_code is not null and p_county_code is not null
1908: and p_city_code is null then
1909:
1910: fnd_message.set_name('PAY', 'PAY_76861_TAX_CODEL_TAX_LOC');
1911: fnd_message.raise_error;
1912:
1913: elsif p_state_code is not null and p_county_code is not null
1914: and p_city_code is not null then
1915:
1912:
1913: elsif p_state_code is not null and p_county_code is not null
1914: and p_city_code is not null then
1915:
1916: fnd_message.set_name('PAY', 'PAY_76862_TAX_CIDEL_TAX_LOC');
1917: fnd_message.raise_error;
1918:
1919: end if;
1920:
1913: elsif p_state_code is not null and p_county_code is not null
1914: and p_city_code is not null then
1915:
1916: fnd_message.set_name('PAY', 'PAY_76862_TAX_CIDEL_TAX_LOC');
1917: fnd_message.raise_error;
1918:
1919: end if;
1920:
1921: end if;
1941:
1942: if p_state_code is not null and p_county_code is null
1943: and p_city_code is null then
1944:
1945: /* fnd_message.set_name('Cannot delete. State assigned to resident address') */
1946: fnd_message.set_name('PAY', 'PAY_52296_TAX_STDEL_RES');
1947: fnd_message.raise_error;
1948:
1949: elsif p_state_code is not null and p_county_code is not null
1942: if p_state_code is not null and p_county_code is null
1943: and p_city_code is null then
1944:
1945: /* fnd_message.set_name('Cannot delete. State assigned to resident address') */
1946: fnd_message.set_name('PAY', 'PAY_52296_TAX_STDEL_RES');
1947: fnd_message.raise_error;
1948:
1949: elsif p_state_code is not null and p_county_code is not null
1950: and p_city_code is null then
1943: and p_city_code is null then
1944:
1945: /* fnd_message.set_name('Cannot delete. State assigned to resident address') */
1946: fnd_message.set_name('PAY', 'PAY_52296_TAX_STDEL_RES');
1947: fnd_message.raise_error;
1948:
1949: elsif p_state_code is not null and p_county_code is not null
1950: and p_city_code is null then
1951:
1948:
1949: elsif p_state_code is not null and p_county_code is not null
1950: and p_city_code is null then
1951:
1952: /* fnd_message.set_name('Cannot delete. County assigned to resident address') */
1953: fnd_message.set_name('PAY', 'PAY_52297_TAX_CODEL_RES');
1954: fnd_message.raise_error;
1955:
1956: elsif p_state_code is not null and p_county_code is not null
1949: elsif p_state_code is not null and p_county_code is not null
1950: and p_city_code is null then
1951:
1952: /* fnd_message.set_name('Cannot delete. County assigned to resident address') */
1953: fnd_message.set_name('PAY', 'PAY_52297_TAX_CODEL_RES');
1954: fnd_message.raise_error;
1955:
1956: elsif p_state_code is not null and p_county_code is not null
1957: and p_city_code is not null then
1950: and p_city_code is null then
1951:
1952: /* fnd_message.set_name('Cannot delete. County assigned to resident address') */
1953: fnd_message.set_name('PAY', 'PAY_52297_TAX_CODEL_RES');
1954: fnd_message.raise_error;
1955:
1956: elsif p_state_code is not null and p_county_code is not null
1957: and p_city_code is not null then
1958:
1955:
1956: elsif p_state_code is not null and p_county_code is not null
1957: and p_city_code is not null then
1958:
1959: /* fnd_message.set_name('Cannot delete. City assigned to resident address') */
1960: fnd_message.set_name('PAY', 'PAY_52298_TAX_CIDEL_RES');
1961: fnd_message.raise_error;
1962:
1963: end if;
1956: elsif p_state_code is not null and p_county_code is not null
1957: and p_city_code is not null then
1958:
1959: /* fnd_message.set_name('Cannot delete. City assigned to resident address') */
1960: fnd_message.set_name('PAY', 'PAY_52298_TAX_CIDEL_RES');
1961: fnd_message.raise_error;
1962:
1963: end if;
1964:
1957: and p_city_code is not null then
1958:
1959: /* fnd_message.set_name('Cannot delete. City assigned to resident address') */
1960: fnd_message.set_name('PAY', 'PAY_52298_TAX_CIDEL_RES');
1961: fnd_message.raise_error;
1962:
1963: end if;
1964:
1965: end if;
1983:
1984: if p_state_code is not null and p_county_code is null
1985: and p_city_code is null then
1986:
1987: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1988: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1989: fnd_message.raise_error;
1990:
1991: elsif p_state_code is not null and p_county_code is not null
1984: if p_state_code is not null and p_county_code is null
1985: and p_city_code is null then
1986:
1987: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1988: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1989: fnd_message.raise_error;
1990:
1991: elsif p_state_code is not null and p_county_code is not null
1992: and p_city_code is null then
1985: and p_city_code is null then
1986:
1987: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1988: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1989: fnd_message.raise_error;
1990:
1991: elsif p_state_code is not null and p_county_code is not null
1992: and p_city_code is null then
1993:
1990:
1991: elsif p_state_code is not null and p_county_code is not null
1992: and p_city_code is null then
1993:
1994: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1995: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1996: fnd_message.raise_error;
1997:
1998: elsif p_state_code is not null and p_county_code is not null
1991: elsif p_state_code is not null and p_county_code is not null
1992: and p_city_code is null then
1993:
1994: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1995: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1996: fnd_message.raise_error;
1997:
1998: elsif p_state_code is not null and p_county_code is not null
1999: and p_city_code is not null then
1992: and p_city_code is null then
1993:
1994: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
1995: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
1996: fnd_message.raise_error;
1997:
1998: elsif p_state_code is not null and p_county_code is not null
1999: and p_city_code is not null then
2000:
1997:
1998: elsif p_state_code is not null and p_county_code is not null
1999: and p_city_code is not null then
2000:
2001: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
2002: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
2003: fnd_message.raise_error;
2004:
2005: end if;
1998: elsif p_state_code is not null and p_county_code is not null
1999: and p_city_code is not null then
2000:
2001: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
2002: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
2003: fnd_message.raise_error;
2004:
2005: end if;
2006:
1999: and p_city_code is not null then
2000:
2001: /* fnd_message.set_name('Cannot delete. Payroll has been run ') */
2002: fnd_message.set_name('PAY', 'PAY_52235_TAX_RULE_DELETE');
2003: fnd_message.raise_error;
2004:
2005: end if;
2006:
2007: end if;