1: package body pay_us_emp_dt_tax_rules as
2: /* $Header: pyusdtw4.pkb 120.20.12020000.2 2012/07/05 03:11:29 amnaraya ship $ */
3:
4: /* Name : maintain_element_entry
5: Purpose : This procedure can be used to create as well as update the vertex
100: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
101: p_legislation => 'US');
102: if l_payroll_installed then
103:
104: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
105: ,1);
106:
107: open csr_tax_element;
108:
127: end loop;
128:
129: close csr_tax_element;
130:
131: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
132: ,2);
133:
134: /* Check that all of the input value id for vertex, exists */
135:
144: end if;
145:
146: end loop;
147:
148: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
149: ,3);
150:
151: /* Get element link */
152: l_element_link_id := hr_entry_api.get_link(
160: fnd_message.set_token('1','VERTEX');
161: fnd_message.raise_error;
162: end if;
163:
164: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
165: ,4);
166:
167: /* Store screen entry value in the table */
168:
180: if p_mode = 'INSERT' then
181:
182: /* Create the vertex element entry */
183:
184: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,5);
185:
186: hr_entry_api.insert_element_entry( P_effective_start_date => l_effective_start_date,
187: P_effective_end_date => l_effective_end_date,
188: P_element_entry_id => l_element_entry_id,
193: P_num_entry_values => 3,
194: P_input_value_id_tbl => l_inp_value_id_table,
195: P_entry_value_tbl => l_scr_value_table);
196:
197: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,6);
198:
199: elsif p_mode in ('CORRECTION','UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE','INSERT_OLD') then
200:
201: /* Get the element entry of the vertex element entry that is to be updated
200:
201: /* Get the element entry of the vertex element entry that is to be updated
202: or deleted */
203:
204: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,7);
205:
206:
207: open csr_ele_entry(l_element_link_id, l_inp_value_id_table(2));
208:
220:
221: close csr_ele_entry;
222: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
223: fnd_message.set_token('PROCEDURE',
224: 'pay_us_emp_dt_tax_rules.maintain_element_entry');
225: fnd_message.set_token('STEP','1');
226: fnd_message.raise_error;
227:
228: end if;
245:
246: close csr_get_curr_percnt;
247: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
248: fnd_message.set_token('PROCEDURE',
249: 'pay_us_emp_dt_tax_rules.maintain_element_entry');
250: fnd_message.set_token('STEP','2');
251: fnd_message.raise_error;
252:
253: end if;
370: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
371: p_legislation => 'US');
372: if l_payroll_installed then
373:
374: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
375: ,1);
376:
377: open csr_wc_tax_element;
378:
397: end loop;
398:
399: close csr_wc_tax_element;
400:
401: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
402: ,2);
403:
404: /* Check that all of the input value id for vertex, exists */
405:
414: end if;
415:
416: end loop;
417:
418: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
419: ,3);
420:
421: /* Get element link */
422: l_element_link_id := hr_entry_api.get_link(
431: fnd_message.raise_error;
432:
433: end if;
434:
435: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
436: ,4);
437:
438: /* Store screen entry value in the table */
439:
452:
453: /* Insert the worker's compensation element entry */
454:
455: hr_utility.set_location(
456: 'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry' ,5);
457: hr_entry_api.insert_element_entry(
458: P_effective_start_date => l_effective_start_date,
459: P_effective_end_date => l_effective_end_date,
460: P_element_entry_id => l_element_entry_id,
466: P_input_value_id_tbl => l_inp_value_id_table,
467: P_entry_value_tbl => l_scr_value_table);
468:
469: hr_utility.set_location(
470: 'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry' ,8);
471:
472: elsif p_mode in ('CORRECTION', 'UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP')then
473:
474: /* Update the worker's compensation element entry */
486:
487: close csr_wc_ele_entry;
488: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
489: fnd_message.set_token('PROCEDURE',
490: 'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry');
491: fnd_message.set_token('STEP','8');
492: fnd_message.raise_error;
493:
494: end if;
660:
661: close csr_get_eff_date;
662: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
663: fnd_message.set_token('PROCEDURE',
664: 'pay_us_emp_dt_tax_rules.create_tax_percentage');
665: fnd_message.set_token('STEP','1');
666: fnd_message.raise_error;
667:
668: end if;
887:
888: begin
889:
890:
891: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
892: ' - Opening cursor', 1);
893:
894: if p_mode = 'INSERT' then
895:
894: if p_mode = 'INSERT' then
895:
896: open csr_fed_tax_rule_id;
897:
898: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
899: ' - Fetching cursor', 2);
900:
901: fetch csr_fed_tax_rule_id into p_emp_fed_tax_rule_id;
902:
899: ' - Fetching cursor', 2);
900:
901: fetch csr_fed_tax_rule_id into p_emp_fed_tax_rule_id;
902:
903: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
904: ' - Closing cursor', 3);
905:
906: close csr_fed_tax_rule_id;
907:
905:
906: close csr_fed_tax_rule_id;
907:
908:
909: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
910: ' - inserting row', 4);
911:
912: end if;
913:
1112:
1113: /* create workers compensation element entry for the sui state in
1114: the federal record */
1115:
1116: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
1117: ' - inserting row', 5);
1118: l_step := 4;
1119:
1120: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
1134:
1135: if l_pos = 0 then
1136: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1137: fnd_message.set_token('PROCEDURE',
1138: 'pay_us_emp_dt_tax_rules.insert_fed_tax_row - '|| substr(sqlerrm,1,60));
1139: fnd_message.set_token('STEP',to_char(l_step));
1140: fnd_message.raise_error;
1141:
1142: else
1266:
1267: begin
1268:
1269:
1270: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1271: ' - Opening cursor', 1);
1272:
1273: open csr_state_tax_rule_id;
1274:
1271: ' - Opening cursor', 1);
1272:
1273: open csr_state_tax_rule_id;
1274:
1275: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1276: ' - Fetching cursor', 2);
1277:
1278: fetch csr_state_tax_rule_id into p_emp_state_tax_rule_id;
1279:
1276: ' - Fetching cursor', 2);
1277:
1278: fetch csr_state_tax_rule_id into p_emp_state_tax_rule_id;
1279:
1280: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1281: ' - Closing cursor', 3);
1282:
1283: close csr_state_tax_rule_id;
1284:
1282:
1283: close csr_state_tax_rule_id;
1284:
1285:
1286: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1287: ' - inserting row', 4);
1288:
1289: --Bug 13872151 :Check if the State Tax rule already exists
1290: open csr_state_tax_rule;
1481:
1482: if sql%notfound then
1483: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1484: fnd_message.set_token('PROCEDURE',
1485: 'pay_us_emp_dt_tax_rules.insert_state_tax_row');
1486: fnd_message.set_token('STEP','4');
1487: fnd_message.raise_error;
1488: end if;
1489:
1497: end if;
1498:
1499: close csr_get_row_id;
1500:
1501: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1502: ' - creating %age record ', 5);
1503:
1504: /* Get the changes in location of an assignment.
1505: For each change in location, create vertex element entry with
1652: p_mode => 'I',
1653: p_rowid => null);
1654: end if;
1655:
1656: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1657: ' - Opening cursor', 1);
1658:
1659: open csr_county_tax_rule_id;
1660:
1657: ' - Opening cursor', 1);
1658:
1659: open csr_county_tax_rule_id;
1660:
1661: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1662: ' - Fetching cursor', 2);
1663:
1664: fetch csr_county_tax_rule_id into p_emp_county_tax_rule_id;
1665:
1662: ' - Fetching cursor', 2);
1663:
1664: fetch csr_county_tax_rule_id into p_emp_county_tax_rule_id;
1665:
1666: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1667: ' - Closing cursor', 3);
1668:
1669: close csr_county_tax_rule_id;
1670:
1668:
1669: close csr_county_tax_rule_id;
1670:
1671:
1672: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1673: ' - inserting row', 4);
1674:
1675: /** added for bug 13872151 - Check if the same state and county combination rule already exists**/
1676: open csr_county_tax_rule;
1855:
1856: if sql%notfound then
1857: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
1858: fnd_message.set_token('PROCEDURE',
1859: 'pay_us_emp_dt_tax_rules.insert_county_tax_row');
1860: fnd_message.set_token('STEP','4');
1861: fnd_message.raise_error;
1862: end if;
1863:
1871: end if;
1872:
1873: close csr_get_row_id;
1874:
1875: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1876: ' - creating %age record ', 5);
1877:
1878: /* Get the changes in location of an assignment.
1879: For each change in location, create vertex element entry with
2037: p_mode => 'I',
2038: p_rowid => null);
2039: end if;
2040:
2041: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2042: ' - Opening cursor', 1);
2043:
2044: open csr_city_tax_rule_id;
2045:
2042: ' - Opening cursor', 1);
2043:
2044: open csr_city_tax_rule_id;
2045:
2046: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2047: ' - Fetching cursor', 2);
2048:
2049: fetch csr_city_tax_rule_id into p_emp_city_tax_rule_id;
2050:
2047: ' - Fetching cursor', 2);
2048:
2049: fetch csr_city_tax_rule_id into p_emp_city_tax_rule_id;
2050:
2051: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2052: ' - Closing cursor', 3);
2053:
2054: close csr_city_tax_rule_id;
2055:
2053:
2054: close csr_city_tax_rule_id;
2055:
2056:
2057: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2058: ' - inserting row', 4);
2059:
2060: -- Bug 13872151:Check if the same state, county and city combination tax rule already exists.
2061: open csr_city_tax_rule;
2243: if sql%notfound then
2244:
2245: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2246: fnd_message.set_token('PROCEDURE',
2247: 'pay_us_emp_dt_tax_rules.insert_city_tax_row');
2248: fnd_message.set_token('STEP','4');
2249: fnd_message.raise_error;
2250:
2251: end if;
2261:
2262: close csr_get_row_id;
2263:
2264:
2265: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2266: ' - creating %age record ', 5);
2267:
2268: /* Get the changes in location of an assignment.
2269: For each change in location, create vertex element entry with
2402:
2403: begin
2404:
2405:
2406: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_fed_tax_row'||
2407: ' - updating row', 1);
2408: ----added by vaprakas Bug 5607135
2409: check_nra_status(p_assignment_id
2410: , p_withholding_allowances
2505:
2506: if sql%notfound then
2507: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2508: fnd_message.set_token('PROCEDURE',
2509: 'pay_us_emp_dt_tax_rules.update_fed_tax');
2510: fnd_message.set_token('STEP','1');
2511: fnd_message.raise_error;
2512: end if;
2513:
2617: p_sta_information29 in varchar2,
2618: p_sta_information30 in varchar2) is
2619: begin
2620:
2621: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
2622: ' - updating row', 1);
2623:
2624: update PAY_US_EMP_STATE_TAX_RULES_F
2625: set emp_state_tax_rule_id = p_emp_state_tax_rule_id,
2713:
2714: if sql%notfound then
2715: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2716: fnd_message.set_token('PROCEDURE',
2717: 'pay_us_emp_dt_tax_rules.update_state_tax_row');
2718: fnd_message.set_token('STEP','1');
2719: fnd_message.raise_error;
2720: end if;
2721:
2718: fnd_message.set_token('STEP','1');
2719: fnd_message.raise_error;
2720: end if;
2721:
2722: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
2723: ' - updated row', 2);
2724:
2725: end update_state_tax_row;
2726:
2815:
2816: if p_school_district_code is not null
2817: then
2818:
2819: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2820: ' - checking sd', 1);
2821: /* Check that the school district is assigned to only one county/city
2822: at a given point in time */
2823:
2828: p_mode => 'U',
2829: p_rowid => p_row_id);
2830: end if;
2831:
2832: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2833: ' - updating row', 2);
2834:
2835: update PAY_US_EMP_COUNTY_TAX_RULES_F
2836: set emp_county_tax_rule_id = p_emp_county_tax_rule_id,
2918:
2919: if sql%notfound then
2920: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
2921: fnd_message.set_token('PROCEDURE',
2922: 'pay_us_emp_dt_tax_rules.update_county_tax_row');
2923: fnd_message.set_token('STEP','2');
2924: fnd_message.raise_error;
2925: end if;
2926:
2927: if p_school_district_code is not null then
2928:
2929: /* Insert row into the pay_us_asg_reporting table */
2930:
2931: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2932: ' - asg_geo row', 3);
2933:
2934: pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
2935: P_jurisdiction => p_state_code || '-'||
3032: if p_school_district_code is not null
3033: and p_state_code <> '39'
3034: then
3035:
3036: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3037: ' - checking sd', 1);
3038:
3039: /* Check that the school district is assigned to only one county/city
3040: at a given point in time */
3046: p_mode => 'U',
3047: p_rowid => p_row_id);
3048: end if;
3049:
3050: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3051: ' - updating row', 2);
3052:
3053: update PAY_US_EMP_CITY_TAX_RULES_F
3054: set emp_city_tax_rule_id = p_emp_city_tax_rule_id,
3138: if sql%notfound then
3139:
3140: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
3141: fnd_message.set_token('PROCEDURE',
3142: 'pay_us_emp_dt_tax_rules.update_city_tax_row');
3143: fnd_message.set_token('STEP','2');
3144: fnd_message.raise_error;
3145:
3146: end if;
3148: if p_school_district_code is not null then
3149:
3150: /* Insert row into the pay_us_asg_reporting table */
3151:
3152: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3153: ' - asg_geo row', 3);
3154:
3155: pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
3156: P_jurisdiction => p_state_code || '-' ||
3237:
3238: if l_effective_start_date is null then
3239: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
3240: fnd_message.set_token('PROCEDURE',
3241: 'pay_us_emp_dt_tax_rules.delete_tax_row');
3242: fnd_message.set_token('STEP','1');
3243: fnd_message.raise_error;
3244: end if;
3245:
3551: if csr_fed_rec%NOTFOUND then
3552: close csr_fed_rec;
3553: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
3554: fnd_message.set_token('PROCEDURE',
3555: 'pay_us_emp_dt_tax_rules.lock_fed_tax_row');
3556: fnd_message.set_token('STEP', '1');
3557: fnd_message.raise_error;
3558: end if;
3559:
4038: if csr_state_rec%NOTFOUND then
4039: close csr_state_rec;
4040: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
4041: fnd_message.set_token('PROCEDURE',
4042: 'pay_us_emp_dt_tax_rules.lock_state_tax_row');
4043: fnd_message.set_token('STEP', '1');
4044: fnd_message.raise_error;
4045: end if;
4046:
4520: if csr_county_rec%NOTFOUND then
4521: close csr_county_rec;
4522: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
4523: fnd_message.set_token('PROCEDURE',
4524: 'pay_us_emp_dt_tax_rules.lock_county_tax_row');
4525: fnd_message.set_token('STEP', '1');
4526: fnd_message.raise_error;
4527: end if;
4528:
4986: if csr_city_rec%NOTFOUND then
4987: close csr_city_rec;
4988: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
4989: fnd_message.set_token('PROCEDURE',
4990: 'pay_us_emp_dt_tax_rules.lock_city_tax_row');
4991: fnd_message.set_token('STEP', '1');
4992: fnd_message.raise_error;
4993: end if;
4994:
5371:
5372: begin
5373:
5374: /* Get Filing Status */
5375: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',1);
5376: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
5377: --dbms_output.put_line('sd** '||to_char(p_effective_start_date));
5378: --dbms_output.put_line('ed** '||to_char(p_effective_end_date));
5379: --dbms_output.put_line('sui** '||p_sui_state_code);
5396:
5397: close csr_filing_status;
5398:
5399: /* Get EIC Filing Status */
5400: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',2);
5401:
5402: open csr_eic_fstatus;
5403:
5404: fetch csr_eic_fstatus into l_eic_fstatus_code;
5414: close csr_eic_fstatus;
5415:
5416: /* Insert Federal Tax Record */
5417:
5418: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',3);
5419:
5420: l_mode := 'INSERT';
5421:
5422: insert_fed_tax_row(p_emp_fed_tax_rule_id => l_emp_fed_tax_rule_id,
5506: p_fed_information29 => null,
5507: p_fed_information30 => null,
5508: p_mode => 'INSERT');
5509:
5510: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',5);
5511:
5512: return l_emp_fed_tax_rule_id;
5513:
5514: end insert_def_fed_rec;
5593: l_flag varchar2(1) := 'N';
5594:
5595: begin
5596:
5597: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',1);
5598:
5599: open chk_state_exists;
5600: fetch chk_state_exists into l_flag;
5601: if chk_state_exists%NOTFOUND then
5602: l_flag := 'N';
5603: end if;
5604: close chk_state_exists;
5605:
5606: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',91);
5607: if l_flag = 'N'then
5608: open csr_get_asg_gre(p_assignment_id);
5609: fetch csr_get_asg_gre into ln_asg_tax_unit_id;
5610: close csr_get_asg_gre;
5611:
5612: open csr_fed_or_def(ln_asg_tax_unit_id, p_state_code);
5613: fetch csr_fed_or_def into l_def_pref;
5614:
5615: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',2);
5616:
5617: if csr_fed_or_def%NOTFOUND then
5618: l_filing_status_code := '01';
5619: l_allowances := 0;
5619: l_allowances := 0;
5620: end if;
5621: close csr_fed_or_def;
5622:
5623: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',3);
5624:
5625:
5626: /* Bug 864068 - Added check for Connecticut (p_state_code = 07) to default
5627: the filing status for new Connecticut State Tax records to '07' instead
5632: the highest rate.
5633: */
5634:
5635: if p_state_code = '07' then
5636: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4);
5637: l_filing_status_code := '07';
5638: l_allowances := 0;
5639: elsif p_state_code = '22' then -- Bug No 4325326
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5636: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4);
5637: l_filing_status_code := '07';
5638: l_allowances := 0;
5639: elsif p_state_code = '22' then -- Bug No 4325326
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5641: l_filing_status_code := '04';
5642: l_allowances := 0;
5643: elsif l_def_pref = 'SINGLE_ZERO' or l_def_pref is null then
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5641: l_filing_status_code := '04';
5642: l_allowances := 0;
5643: elsif l_def_pref = 'SINGLE_ZERO' or l_def_pref is null then
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5645: l_filing_status_code := '01';
5646: l_allowances := 0;
5647: elsif l_def_pref = 'FED_DEF' then
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5645: l_filing_status_code := '01';
5646: l_allowances := 0;
5647: elsif l_def_pref = 'FED_DEF' then
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5649: open csr_filing_status(p_assignment_id, p_state_code);
5650: fetch csr_filing_status into l_filing_status_code, l_allowances;
5651: if csr_filing_status%NOTFOUND then
5652: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',7);
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5649: open csr_filing_status(p_assignment_id, p_state_code);
5650: fetch csr_filing_status into l_filing_status_code, l_allowances;
5651: if csr_filing_status%NOTFOUND then
5652: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',7);
5653: l_filing_status_code := '01';
5654: l_allowances := 0;
5655: end if;
5656: close csr_filing_status;
5658: end if;
5659:
5660: /* Insert State Tax record */
5661:
5662: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',8);
5663:
5664: insert_state_tax_row ( p_row_id => l_row_id,
5665: p_emp_state_tax_rule_id => l_emp_state_tax_rule_id,
5666: p_effective_start_date => p_effective_start_date,
5750: p_sta_information28 => null,
5751: p_sta_information29 => null,
5752: p_sta_information30 => null );
5753:
5754: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',9);
5755:
5756: end if;
5757:
5758: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',10);
5754: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',9);
5755:
5756: end if;
5757:
5758: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',10);
5759:
5760: return l_emp_state_tax_rule_id;
5761:
5762: end insert_def_state_rec;
5803: l_flag varchar2(1) := 'N';
5804:
5805: begin
5806:
5807: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',1);
5808:
5809: open chk_county_exists;
5810: fetch chk_county_exists into l_flag;
5811: if chk_county_exists%NOTFOUND then
5812: l_flag := 'N';
5813: end if;
5814: close chk_county_exists;
5815:
5816: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',91);
5817:
5818: if l_flag = 'N' then
5819:
5820: open csr_filing_status;
5820: open csr_filing_status;
5821:
5822: fetch csr_filing_status into l_filing_status_code;
5823:
5824: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',2);
5825:
5826: if csr_filing_status%NOTFOUND then
5827:
5828: fnd_message.set_name('PAY','HR_6091_DEF_MISSING_LOOKUPS');
5834: close csr_filing_status;
5835:
5836: /* Insert County Tax record */
5837:
5838: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',3);
5839:
5840:
5841: insert_county_tax_row(p_row_id => l_row_id,
5842: p_emp_county_tax_rule_id => l_emp_county_tax_rule_id,
5922: p_cnt_information28 => null,
5923: p_cnt_information29 => null,
5924: p_cnt_information30 => null );
5925:
5926: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',4);
5927: end if;
5928: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',5);
5929:
5930: return l_emp_county_tax_rule_id;
5924: p_cnt_information30 => null );
5925:
5926: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',4);
5927: end if;
5928: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',5);
5929:
5930: return l_emp_county_tax_rule_id;
5931:
5932: end insert_def_county_rec;
5976:
5977:
5978: begin
5979:
5980: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',1);
5981:
5982: open chk_city_exists;
5983: fetch chk_city_exists into l_flag;
5984: if chk_city_exists%NOTFOUND then
5985: l_flag := 'N';
5986: end if;
5987: close chk_city_exists;
5988:
5989: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',91);
5990:
5991: if l_flag = 'N' then
5992:
5993: open csr_filing_status;
5993: open csr_filing_status;
5994:
5995: fetch csr_filing_status into l_filing_status_code;
5996:
5997: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',2);
5998:
5999: if csr_filing_status%NOTFOUND then
6000:
6001: fnd_message.set_name('PAY','HR_6091_DEF_MISSING_LOOKUPS');
6007: close csr_filing_status;
6008:
6009: /* Insert City Tax record */
6010:
6011: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',3);
6012:
6013:
6014: insert_city_tax_row(p_row_id => l_row_id,
6015: p_emp_city_tax_rule_id => l_emp_city_tax_rule_id,
6096: p_cty_information28 => null,
6097: p_cty_information29 => null,
6098: p_cty_information30 => null );
6099:
6100: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',4);
6101: end if;
6102:
6103: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',5);
6104:
6099:
6100: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',4);
6101: end if;
6102:
6103: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',5);
6104:
6105: return l_emp_city_tax_rule_id;
6106:
6107: end insert_def_city_rec;
6145: -- PAY_ELEMENT_ENTRIES_F
6146:
6147: begin
6148:
6149: hr_utility.set_location('pay_us_emp_dt_tax_rules.zero_out_time',1);
6150:
6151: open csr_get_jurisdiction;
6152:
6153: /* Now loop through all VERTEX element entries
6175: end loop;
6176:
6177: close csr_get_jurisdiction;
6178:
6179: hr_utility.set_location('pay_us_emp_dt_tax_rules.zero_out_time',2);
6180:
6181: end zero_out_time;
6182:
6183: /* Name : set_sui_wage_base_override
6329: balance_tab balance_typ ;
6330: begin
6331: --hr_utility.trace_on(null,'pyusdtw4') ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6336: hr_utility.trace('p_session_date := ' || to_char(p_session_date)) ;
6337:
6683:
6684: begin
6685:
6686:
6687: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',1);
6688: if (p_new_location_id is null) and (p_res_state_code is not null
6689: and p_res_county_code is not null
6690: and p_res_city_code is not null )then
6691:
6698:
6699: /* Get the state code, county code and the city code for the
6700: new location */
6701:
6702: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',2);
6703: open csr_get_codes(p_new_location_id);
6704: fetch csr_get_codes into l_state_code, l_county_code,l_city_code,
6705: l_ovrd_state_code, l_ovrd_county_code,
6706: l_ovrd_city_code;
6706: l_ovrd_city_code;
6707: if csr_get_codes%NOTFOUND then
6708: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
6709: fnd_message.set_token('PROCEDURE',
6710: 'pay_us_emp_dt_tax_rules.create_new_loc_rec');
6711: fnd_message.set_token('STEP','2');
6712: fnd_message.raise_error;
6713: end if;
6714: close csr_get_codes;
6714: close csr_get_codes;
6715:
6716: end if;
6717:
6718: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',3);
6719: /* Get the default date from the federal tax rules record */
6720:
6721: open csr_get_eff_date;
6722:
6724:
6725: if l_default_date is null then
6726: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
6727: fnd_message.set_token('PROCEDURE',
6728: 'pay_us_emp_dt_tax_rules.create_new_location_rec');
6729: fnd_message.set_token('STEP','1');
6730: fnd_message.raise_error;
6731: end if;
6732:
6734:
6735: /* Create the new location records */
6736:
6737:
6738: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',4);
6739: l_ret_code := 0;
6740: l_ret_text := null;
6741: l_jurisdiction_code := l_state_code ||'-000-0000';
6742:
6739: l_ret_code := 0;
6740: l_ret_text := null;
6741: l_jurisdiction_code := l_state_code ||'-000-0000';
6742:
6743: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',5);
6744: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6745: p_jurisdiction_code => l_jurisdiction_code,
6746: p_ret_code => l_ret_code,
6747: p_ret_text => l_ret_text);
6744: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6745: p_jurisdiction_code => l_jurisdiction_code,
6746: p_ret_code => l_ret_code,
6747: p_ret_text => l_ret_text);
6748: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',6);
6749:
6750: /* Bug 2535501 */
6751:
6752: open csr_get_max_assign_end_dt;
6755:
6756: if csr_get_max_assign_end_dt%NOTFOUND then
6757: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
6758: fnd_message.set_token('PROCEDURE',
6759: 'pay_us_emp_dt_tax_rules.create_new_location_rec');
6760: fnd_message.set_token('STEP','3');
6761: fnd_message.raise_error;
6762: end if;
6763:
6774: and also the state percentage record for every change in
6775: location */
6776:
6777: if l_ret_code = 1 then
6778: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',7);
6779: l_emp_state_tax_rule_id :=
6780: insert_def_state_rec(p_assignment_id => p_assignment_id,
6781: p_effective_start_date => l_default_date,
6782: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6789: for state. The ins_def_county_rec routine will create the
6790: county tax rule record from begin of time till end of time
6791: and also the county percentage record for every change in
6792: location */
6793: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',8);
6794:
6795: l_emp_county_tax_rule_id :=
6796: insert_def_county_rec(p_assignment_id => p_assignment_id,
6797: p_effective_start_date => l_default_date,
6806: for state. The ins_def_city_rec routine will create the
6807: city tax rule record from begin of time till end of time
6808: and also the city percentage record for every change in
6809: location */
6810: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',9);
6811:
6812: l_emp_city_tax_rule_id :=
6813: insert_def_city_rec(p_assignment_id => p_assignment_id,
6814: p_effective_start_date => l_default_date,
6819: p_city_code => l_city_code,
6820: p_business_group_id => p_business_group,
6821: p_percent_time => 0);
6822:
6823: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',10);
6824:
6825: elsif l_ret_code = 0 then
6826: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',101);
6827: /* State record exists. Now check if county record exists */
6822:
6823: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',10);
6824:
6825: elsif l_ret_code = 0 then
6826: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',101);
6827: /* State record exists. Now check if county record exists */
6828: -- Update SUI Wage Base Override Amount
6829: -- Update SUI WAGE BASE Overide amount if payroll is installed otherwise don't
6830: -- call the procedure which does the update
6832: /*
6833: IF hr_utility.chk_product_install(p_product =>'Oracle Payroll',
6834: p_legislation => 'US')
6835: then
6836: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
6837: if p_assignment_id is not null and p_session_date is not null
6838: then
6839: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',103);
6840: set_sui_wage_base_override(p_assignment_id,l_state_code,p_session_date) ;
6835: then
6836: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
6837: if p_assignment_id is not null and p_session_date is not null
6838: then
6839: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',103);
6840: set_sui_wage_base_override(p_assignment_id,l_state_code,p_session_date) ;
6841: end if ;
6842: end if;
6843: -- End Change
6846: l_ret_code := 0;
6847: l_ret_text := null;
6848: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-0000';
6849:
6850: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',11);
6851: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6852: p_jurisdiction_code => l_jurisdiction_code,
6853: p_ret_code => l_ret_code,
6854: p_ret_text => l_ret_text);
6851: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6852: p_jurisdiction_code => l_jurisdiction_code,
6853: p_ret_code => l_ret_code,
6854: p_ret_text => l_ret_text);
6855: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',12);
6856: /* If county record does not exist then city will also not exist */
6857: if l_ret_code = 1 then
6858:
6859: /* Create the county tax rule record and then create %age record
6861: county tax rule record from begin of time till end of time
6862: and also the county percentage record for every change in
6863: location */
6864:
6865: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',13);
6866: l_emp_county_tax_rule_id :=
6867: insert_def_county_rec(p_assignment_id => p_assignment_id,
6868: p_effective_start_date => l_default_date,
6869: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6878: city tax rule record from begin of time till end of time
6879: and also the city percentage record for every change in
6880: location */
6881:
6882: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',14);
6883: l_emp_city_tax_rule_id :=
6884: insert_def_city_rec(p_assignment_id => p_assignment_id,
6885: p_effective_start_date => l_default_date,
6886: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6889: p_county_code => l_county_code,
6890: p_city_code => l_city_code,
6891: p_business_group_id => p_business_group,
6892: p_percent_time => 0);
6893: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',15);
6894:
6895: elsif l_ret_code = 0 then
6896: /* State and county records exist. Check if the city record exists */
6897:
6899: l_ret_text := null;
6900: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'||
6901: l_city_code;
6902:
6903: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',16);
6904: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6905: p_jurisdiction_code => l_jurisdiction_code,
6906: p_ret_code => l_ret_code,
6907: p_ret_text => l_ret_text);
6904: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6905: p_jurisdiction_code => l_jurisdiction_code,
6906: p_ret_code => l_ret_code,
6907: p_ret_text => l_ret_text);
6908: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',17);
6909:
6910: /* If city record does not exist then create one */
6911:
6912: if l_ret_code = 1 then
6915: for state. The ins_def_city_rec routine will create the
6916: city tax rule record from begin of time till end of time
6917: and also the city percentage record for every change in
6918: location */
6919: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',18);
6920:
6921: l_emp_city_tax_rule_id :=
6922: insert_def_city_rec(p_assignment_id => p_assignment_id,
6923: p_effective_start_date => l_default_date,
6927: p_county_code => l_county_code,
6928: p_city_code => l_city_code,
6929: p_business_group_id => p_business_group,
6930: p_percent_time => 0);
6931: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',19);
6932:
6933: end if;
6934:
6935: end if;
6937: end if;
6938:
6939: if l_ovrd_state_code <> l_state_code then
6940:
6941: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',20);
6942: l_emp_state_tax_rule_id :=
6943: insert_def_state_rec(p_assignment_id => p_assignment_id,
6944: p_effective_start_date => l_default_date,
6945: p_effective_end_date => l_end_of_time,
6945: p_effective_end_date => l_end_of_time,
6946: p_state_code => l_ovrd_state_code,
6947: p_business_group_id => p_business_group,
6948: p_percent_time => 0);
6949: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',21);
6950:
6951: end if;
6952:
6953: if (l_ovrd_state_code <> l_state_code
6951: end if;
6952:
6953: if (l_ovrd_state_code <> l_state_code
6954: or l_ovrd_county_code <> l_county_code) then
6955: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',22);
6956: l_emp_county_tax_rule_id :=
6957: insert_def_county_rec(p_assignment_id => p_assignment_id,
6958: p_effective_start_date => l_default_date,
6959: p_effective_end_date => l_end_of_time,
6960: p_state_code => l_ovrd_state_code,
6961: p_county_code => l_ovrd_county_code,
6962: p_business_group_id => p_business_group,
6963: p_percent_time => 0);
6964: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',23);
6965: end if;
6966:
6967: if (l_ovrd_state_code <> l_state_code
6968: or l_ovrd_county_code <> l_county_code
6966:
6967: if (l_ovrd_state_code <> l_state_code
6968: or l_ovrd_county_code <> l_county_code
6969: or l_ovrd_city_code <> l_city_code) then
6970: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',24);
6971: l_emp_city_tax_rule_id :=
6972: insert_def_city_rec(p_assignment_id => p_assignment_id,
6973: p_effective_start_date => l_default_date,
6974: p_effective_end_date => l_end_of_time,
6976: p_county_code => l_ovrd_county_code,
6977: p_city_code => l_ovrd_city_code,
6978: p_business_group_id => p_business_group,
6979: p_percent_time => 0);
6980: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',25);
6981: end if;
6982:
6983: /* if called for change in location then set the city to 100% */
6984:
6986: p_percent = 100 and
6987: (p_res_state_code is null
6988: and p_res_county_code is null and p_res_city_code is null) then
6989:
6990: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',26);
6991: /* Now update the city record and set it to 100% */
6992:
6993: if l_state_code = l_ovrd_state_code and l_county_code = l_ovrd_county_code
6994: and l_city_code = l_ovrd_city_code then
6992:
6993: if l_state_code = l_ovrd_state_code and l_county_code = l_ovrd_county_code
6994: and l_city_code = l_ovrd_city_code then
6995: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'|| l_city_code;
6996: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',27);
6997: else
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
6995: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'|| l_city_code;
6996: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',27);
6997: else
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
7001:
7002: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',29);
7003: maintain_element_entry (p_assignment_id => p_assignment_id,
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
7001:
7002: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',29);
7003: maintain_element_entry (p_assignment_id => p_assignment_id,
7004: p_effective_start_date => p_validation_start_date,
7005: p_effective_end_date => p_validation_end_date,
7006: p_session_date => p_session_date,
7006: p_session_date => p_session_date,
7007: p_jurisdiction_code => l_jurisdiction_code,
7008: p_percentage_time => 100,
7009: p_mode => 'CORRECTION');
7010: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',30);
7011: end if;
7012:
7013: end create_new_location_rec;
7014:
7110: end loop;
7111:
7112: close csr_tax_element;
7113:
7114: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7115: ,2);
7116:
7117: /* Check that all of the input value id for vertex, exists */
7118:
7127: end if;
7128:
7129: end loop;
7130:
7131: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7132: ,3);
7133:
7134: /* Get element link */
7135: l_step := 2;
7144: fnd_message.set_token('1','ELEMENT LINK');
7145: fnd_message.raise_error;
7146: end if;
7147:
7148: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7149: ,4);
7150:
7151: /* Get the Element Entry Id */
7152: l_step := 3;
7158:
7159: close csr_ele_entry;
7160: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7161: fnd_message.set_token('PROCEDURE',
7162: 'pay_us_emp_dt_tax_rules.del_updt_entries_for_dates' ||
7163: '- SQLCODE:'|| to_char(sqlcode));
7164: fnd_message.set_token('STEP',to_char(l_step));
7165: fnd_message.raise_error;
7166:
7254: exception
7255: when others then
7256: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7257: fnd_message.set_token('PROCEDURE',
7258: 'pay_us_emp_dt_tax_rules.del_updt_entries_for_dates' ||
7259: '- SQLCODE:'|| to_char(sqlcode));
7260: fnd_message.set_token('STEP',to_char(l_step));
7261: fnd_message.raise_error;
7262:
7463: fetch csr_tax_element into l_element_type_id;
7464: if csr_tax_element%NOTFOUND then
7465: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7466: fnd_message.set_token('PROCEDURE',
7467: 'pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates');
7468: fnd_message.set_token('STEP',to_char(l_step));
7469: fnd_message.raise_error;
7470: end if;
7471:
7470: end if;
7471:
7472: close csr_tax_element;
7473:
7474: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ,2);
7475:
7476: /* Get element link */
7477: l_step := 2;
7478: l_element_link_id := hr_entry_api.get_link(
7486: fnd_message.set_token('1','ELEMENT LINK');
7487: fnd_message.raise_error;
7488: end if;
7489:
7490: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ,3);
7491:
7492: /* Get the Element Entry Id */
7493: l_step := 3;
7494: open csr_wc_ele_entry(l_element_link_id);
7499:
7500: close csr_wc_ele_entry;
7501: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7502: fnd_message.set_token('PROCEDURE',
7503: 'pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ||
7504: '- SQLCODE:'|| to_char(sqlcode));
7505: fnd_message.set_token('STEP',to_char(l_step));
7506: fnd_message.raise_error;
7507:
7572: exception
7573: when others then
7574: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7575: fnd_message.set_token('PROCEDURE',
7576: 'pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ||
7577: '- SQLCODE:'|| to_char(sqlcode));
7578: fnd_message.set_token('STEP',to_char(l_step));
7579: fnd_message.raise_error;
7580:
7779: then
7780: close csr_get_next_location;
7781: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7782: fnd_message.set_token('PROCEDURE',
7783: 'pay_us_emp_dt_tax_rules.pull_percentage');
7784: fnd_message.set_token('STEP','1');
7785: fnd_message.raise_error;
7786: end if;
7787:
7865: if csr_tax_element%NOTFOUND then
7866: close csr_tax_element;
7867: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7868: fnd_message.set_token('PROCEDURE',
7869: 'pay_us_emp_dt_tax_rules.pull_percentage');
7870: fnd_message.set_token('STEP','2');
7871: fnd_message.raise_error;
7872: end if;
7873: close csr_tax_element;
7891: then
7892: close csr_get_next_date;
7893: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
7894: fnd_message.set_token('PROCEDURE',
7895: 'pay_us_emp_dt_tax_rules.pull_percentage');
7896: fnd_message.set_token('STEP','3');
7897: fnd_message.raise_error;
7898: end if;
7899:
8150: if csr_get_prev_date%NOTFOUND then
8151: close csr_get_prev_date;
8152: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8153: fnd_message.set_token('PROCEDURE',
8154: 'pay_us_emp_dt_tax_rules.backward_processing');
8155: fnd_message.set_token('STEP','1');
8156: fnd_message.raise_error;
8157: end if;
8158:
8181: end backward_processing;
8182:
8183: begin
8184:
8185: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',1);
8186: l_payroll_installed := hr_utility.chk_product_install(p_product => 'Oracle Payroll',
8187: p_legislation => 'US');
8188:
8189: /* Get effective Start date of the Federal Tax Rules record */
8187: p_legislation => 'US');
8188:
8189: /* Get effective Start date of the Federal Tax Rules record */
8190:
8191: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',2);
8192: open csr_get_eff_date(p_assignment_id);
8193:
8194: fetch csr_get_eff_date into l_default_date;
8195:
8196: if l_default_date is null then
8197: close csr_get_eff_date;
8198: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8199: fnd_message.set_token('PROCEDURE',
8200: 'pay_us_emp_dt_tax_rules.correct_percentage');
8201: fnd_message.set_token('STEP','1');
8202: fnd_message.raise_error;
8203: end if;
8204:
8203: end if;
8204:
8205: close csr_get_eff_date;
8206:
8207: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',3);
8208: open csr_tax_element;
8209: fetch csr_tax_element into l_element_type_id;
8210: if csr_tax_element%NOTFOUND then
8211: close csr_tax_element;
8210: if csr_tax_element%NOTFOUND then
8211: close csr_tax_element;
8212: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8213: fnd_message.set_token('PROCEDURE',
8214: 'pay_us_emp_dt_tax_rules.correct_percentage');
8215: fnd_message.set_token('STEP','2');
8216: fnd_message.raise_error;
8217: end if;
8218: close csr_tax_element;
8216: fnd_message.raise_error;
8217: end if;
8218: close csr_tax_element;
8219:
8220: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',4);
8221: /* Get element link */
8222: l_element_link_id := hr_entry_api.get_link(
8223: P_assignment_id => p_assignment_id,
8224: P_element_type_id => l_element_type_id,
8259: as of date T2 */
8260:
8261: if (p_effective_start_date <= l_default_date and
8262: p_effective_end_date = l_end_of_time) then
8263: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',5);
8264:
8265: if l_payroll_installed then
8266: /* Get all of the percentage records and set the percentage to zero */
8267:
8264:
8265: if l_payroll_installed then
8266: /* Get all of the percentage records and set the percentage to zero */
8267:
8268: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',6);
8269: zero_out_time(p_assignment_id => p_assignment_id,
8270: p_effective_start_date => p_effective_start_date,
8271: p_effective_end_date => p_effective_end_date);
8272: end if;
8273:
8274: /* Create the tax rules records and the %age records for the
8275: new location - if required and set the city %age to 100 */
8276:
8277: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',7);
8278:
8279: l_ovrd_percent := 0;
8280: l_percent := 100;
8281: open csr_get_ovrd_loc(p_assignment_id, p_session_date);
8287: end if;
8288: end if;
8289: close csr_get_ovrd_loc;
8290:
8291: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',8);
8292: create_new_location_rec(p_assignment_id => p_assignment_id,
8293: p_validation_start_date => p_effective_start_date,
8294: p_validation_end_date => p_effective_end_date,
8295: p_session_date => p_session_date,
8298: p_res_county_code => null,
8299: p_res_city_code => null,
8300: p_business_group => p_business_group_id,
8301: p_percent => l_percent);
8302: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',9);
8303: if l_ovrd_percent = 100 then
8304: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',10);
8305: create_new_location_rec(p_assignment_id => p_assignment_id,
8306: p_validation_start_date => p_effective_start_date,
8300: p_business_group => p_business_group_id,
8301: p_percent => l_percent);
8302: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',9);
8303: if l_ovrd_percent = 100 then
8304: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',10);
8305: create_new_location_rec(p_assignment_id => p_assignment_id,
8306: p_validation_start_date => p_effective_start_date,
8307: p_validation_end_date => p_effective_end_date,
8308: p_session_date => p_session_date,
8311: p_res_county_code => null,
8312: p_res_city_code => null,
8313: p_business_group => p_business_group_id,
8314: p_percent => l_ovrd_percent);
8315: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',11);
8316: end if;
8317:
8318:
8319: else /* multiple locations */
8329: if csr_ele_entry%NOTFOUND then
8330: close csr_ele_entry;
8331: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8332: fnd_message.set_token('PROCEDURE',
8333: 'pay_us_emp_dt_tax_rules.correct_percentage');
8334: fnd_message.set_token('STEP','2');
8335: fnd_message.raise_error;
8336: end if;
8337:
8808: if csr_get_next_date%NOTFOUND then
8809: close csr_get_next_date;
8810: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8811: fnd_message.set_token('PROCEDURE',
8812: 'pay_us_emp_dt_tax_rules.correct_percentage');
8813: fnd_message.set_token('STEP','4');
8814: fnd_message.raise_error;
8815: end if;
8816:
8952: if csr_get_next_date%NOTFOUND then
8953: close csr_get_next_date;
8954: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
8955: fnd_message.set_token('PROCEDURE',
8956: 'pay_us_emp_dt_tax_rules.correct_percentage');
8957: fnd_message.set_token('STEP','4');
8958: fnd_message.raise_error;
8959: end if;
8960:
9190:
9191: close csr_tax_element;
9192: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9193: fnd_message.set_token('PROCEDURE',
9194: 'pay_us_emp_dt_tax_rules.update_percentage');
9195: fnd_message.set_token('STEP','1');
9196: fnd_message.raise_error;
9197:
9198: end if;
9225:
9226: close csr_get_dates;
9227: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9228: fnd_message.set_token('PROCEDURE',
9229: 'pay_us_emp_dt_tax_rules.update_percentage');
9230: fnd_message.set_token('STEP','2');
9231: fnd_message.raise_error;
9232:
9233: end if;
9340:
9341: close csr_get_next_date;
9342: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9343: fnd_message.set_token('PROCEDURE',
9344: 'pay_us_emp_dt_tax_rules.update_percentage');
9345: fnd_message.set_token('STEP','2');
9346: fnd_message.raise_error;
9347:
9348: end if;
9494: if csr_get_loc_state%NOTFOUND then
9495: close csr_get_loc_state;
9496: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9497: fnd_message.set_token('PROCEDURE',
9498: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
9499: fnd_message.set_token('STEP',to_char(l_step));
9500: fnd_message.raise_error;
9501: end if;
9502: close csr_get_loc_state;
9555: if csr_get_fed_details%NOTFOUND then
9556: close csr_get_fed_details;
9557: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9558: fnd_message.set_token('PROCEDURE',
9559: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
9560: fnd_message.set_token('STEP',to_char(l_step));
9561: fnd_message.raise_error;
9562: end if;
9563: close csr_get_fed_details;
9787: if csr_get_fed_details%NOTFOUND then
9788: close csr_get_fed_details;
9789: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
9790: fnd_message.set_token('PROCEDURE',
9791: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
9792: fnd_message.set_token('STEP',to_char(l_step));
9793: fnd_message.raise_error;
9794: end if;
9795: close csr_get_fed_details;
10038: if csr_get_fed_details%NOTFOUND then
10039: close csr_get_fed_details;
10040: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
10041: fnd_message.set_token('PROCEDURE',
10042: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
10043: fnd_message.set_token('STEP',to_char(l_step));
10044: fnd_message.raise_error;
10045: end if;
10046: close csr_get_fed_details;
10270: if csr_get_fed_details%NOTFOUND then
10271: close csr_get_fed_details;
10272: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
10273: fnd_message.set_token('PROCEDURE',
10274: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
10275: fnd_message.set_token('STEP',to_char(l_step));
10276: fnd_message.raise_error;
10277: end if;
10278: close csr_get_fed_details;
10484: exception
10485: when others then
10486: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
10487: fnd_message.set_token('PROCEDURE',
10488: 'pay_us_emp_dt_tax_rules.correct_wc_entry');
10489: fnd_message.set_token('STEP',to_char(l_step));
10490: fnd_message.raise_error;
10491: end correct_wc_entry;
10492:
10520: l_validation_start_date := p_session_date;
10521: l_validation_end_date := l_end_of_time;
10522: end if;
10523:
10524: hr_utility.set_location('pay_us_emp_dt_tax_rules.change_wc_entry',1);
10525: correct_wc_entry (p_assignment_id => p_assignment_id,
10526: p_effective_start_date => l_validation_start_date,
10527: p_effective_end_date => l_validation_end_date,
10528: p_session_date => p_session_date,
10528: p_session_date => p_session_date,
10529: p_new_location_id => p_new_location_id,
10530: p_ret_code => l_ret_code,
10531: p_ret_text => l_ret_text);
10532: hr_utility.set_location('pay_us_emp_dt_tax_rules.change_wc_entry',2);
10533:
10534: end change_wc_entry;
10535:
10536: procedure pull_tax_records( p_assignment_id in number,
10536: procedure pull_tax_records( p_assignment_id in number,
10537: p_new_start_date in date,
10538: p_default_date in date) is
10539: l_ef_date DATE;
10540: l_proc VARCHAR2(50) := 'pay_us_emp_dt_tax_rules.pull_tax_records';
10541:
10542: begin
10543: hr_utility.set_location('Entering: ' || l_proc, 5);
10544: /* dscully - modified to handle case where tax record changes
10779: begin
10780:
10781: /* Get the resident and the work state, county and city codes */
10782:
10783: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',1);
10784: pay_us_emp_dt_tax_val.get_orig_res_codes (p_assignment_id => p_assignment_id,
10785:
10786: p_session_date => p_effective_start_date,
10787: p_res_state_code => l_res_state_code,
10790: p_res_state_name => l_res_state_name,
10791: p_res_county_name => l_res_county_name,
10792: p_res_city_name => l_res_city_name);
10793:
10794: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',2);
10795: if l_res_state_code is null then
10796: fnd_message.set_name('PER', 'PER_52985_ADD_NO_STATE_SET');
10797: fnd_message.raise_error;
10798: end if;
10811: an override for the address then get the non override address for
10812: the assignment and assign it to the additional state, county
10813: and city codes */
10814:
10815: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',3);
10816: open csr_chk_addr_ovrd;
10817: fetch csr_chk_addr_ovrd into l_add_state_code,
10818: l_add_county_code,
10819: l_add_city_code;
10823: l_add_city_code := null;
10824: end if;
10825: close csr_chk_addr_ovrd;
10826:
10827: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',4);
10828: pay_us_emp_dt_tax_val.get_all_work_codes (p_assignment_id => p_assignment_id,
10829: p_session_date => p_effective_start_date,
10830: p_work_state_code => l_work_state_code,
10831: p_work_county_code => l_work_county_code,
11175:
11176: close csr_asg_end_date;
11177: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
11178: fnd_message.set_token('PROCEDURE',
11179: 'pay_us_emp_dt_tax_rules.check_defaulting');
11180: fnd_message.set_token('STEP','1');
11181: fnd_message.raise_error;
11182:
11183: end if;
11480:
11481: begin
11482:
11483: -- hr_utility.trace_on(null,'AMITA');
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11527: end if;
11528:
11529: if p_from_form = 'Address' then
11530:
11531: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',2);
11532:
11533: /* Get all of the assignments */
11534:
11535: open csr_addr_get_assignment(p_person_id);
11542:
11543:
11544: exit when csr_addr_get_assignment%NOTFOUND;
11545:
11546: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',3);
11547:
11548: /* Check whether the defaulting of tax rules has been done or not.
11549: If not then do the defaulting of tax rules else return 'Y' in
11550: l_fed_exists to indicate that the defaulting of tax rules has
11649: fetch csr_get_assignment into l_assignment_id, l_validation_start_date;
11650:
11651: exit when csr_get_assignment%NOTFOUND;
11652:
11653: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',3);
11654:
11655: /* Check whether the defaulting of tax rules has been done or not.
11656: If not then do the defaulting of tax rules else return 'Y' in
11657: l_fed_exists to indicate that the defaulting of tax rules has
11681:
11682: close csr_get_default_date;
11683: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
11684: fnd_message.set_token('PROCEDURE',
11685: 'pay_us_emp_dt_tax_rules.default_tax_with_validation');
11686: fnd_message.set_token('STEP','1');
11687: fnd_message.raise_error;
11688:
11689: end if;
11705: end if; /* End of Person form processing */
11706:
11707: if p_from_form = 'Assignment' or p_from_form = 'Tax Rules' then
11708:
11709: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',5);
11710:
11711: if p_from_form = 'Tax Rules' then
11712:
11713: /* Get the min effective start date of the assignment for which the
11718: fetch csr_get_min_eff_date into l_validation_start_date;
11719:
11720: if l_validation_start_date is null then
11721:
11722: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',6);
11723:
11724: p_return_code := 1;
11725: p_return_text := 'Default rules not satisfied';
11726: close csr_get_min_eff_date;
11737: fetch csr_chk_assignment into l_code;
11738:
11739: if csr_chk_assignment%NOTFOUND then
11740:
11741: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',7);
11742:
11743: p_return_code := 1;
11744: p_return_text := 'Default rules not satisfied';
11745: close csr_chk_assignment;
11797:
11798: close csr_get_default_date;
11799: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
11800: fnd_message.set_token('PROCEDURE',
11801: 'pay_us_emp_dt_tax_rules.default_tax_with_validation');
11802: fnd_message.set_token('STEP','2');
11803: fnd_message.raise_error;
11804:
11805: end if;
11809: end if;
11810:
11811: end if; /* This marks the end of processing when called by the 'Tax Rules */
11812:
11813: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',8);
11814:
11815:
11816: /* begin modifications - dscully 21-JUN-2000 */
11817: /* added default creation of tax records for taxation location */
12042:
12043: close csr_get_end_date;
12044: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
12045: fnd_message.set_token('PROCEDURE',
12046: 'pay_us_emp_dt_tax_rules.default_tax_with_validation');
12047: fnd_message.set_token('STEP','3');
12048: fnd_message.raise_error;
12049:
12050: end if;
12119: /* the assignment record itself(which might be a better way of doing it!). */
12120:
12121: /* first lets make sure the record exists */
12122:
12123: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',100);
12124:
12125: create_new_location_rec(p_assignment_id => p_assignment_id,
12126: p_validation_start_date => null,
12127: p_validation_end_date => null,
12136:
12137: /* next we get the begin and end dates for the new location being effective
12138: along with the state code of the jurisdiction */
12139:
12140: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',105);
12141:
12142: open csr_max_loc_date(p_assignment_id,p_location_id,l_validation_start_date);
12143: fetch csr_max_loc_date into l_loc_max_date;
12144: close csr_max_loc_date;
12148: end if;
12149:
12150: --
12151:
12152: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',110);
12153:
12154: open csr_min_loc_date(p_assignment_id,p_location_id,l_validation_start_date);
12155: fetch csr_min_loc_date into l_loc_min_date;
12156: close csr_min_loc_date;
12159: l_loc_min_date := hr_api.g_sot;
12160: end if;
12161:
12162: --
12163: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',115);
12164:
12165: open csr_loc_state_code(p_location_id);
12166: fetch csr_loc_state_code into l_loc_state_code;
12167:
12168: if csr_loc_state_code%NOTFOUND then
12169: close csr_loc_state_code;
12170: fnd_message.set_name('PAY', 'HR_6153_ALL_PROCEDURE_FAIL');
12171: fnd_message.set_token('PROCEDURE',
12172: 'pay_us_emp_dt_tax_rules.default_tax_with_validation');
12173: fnd_message.set_token('STEP','10');
12174: fnd_message.raise_error;
12175: end if;
12176:
12190: to:
12191: ASG --------------|-------L1-----------------
12192: TAX ----------|---|--------------------------
12193: */
12194: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',120);
12195:
12196: /* insert the middle record */
12197: insert_fed_tax_row(
12198: tax_rec.emp_fed_tax_rule_id,
12285: else
12286:
12287: /* here we simply update the sui codes */
12288:
12289: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',125);
12290:
12291: update pay_us_emp_fed_tax_rules_f
12292: set sui_state_code = l_loc_state_code,
12293: sui_jurisdiction_code = l_loc_state_code || '-000-0000'
12304: ASG -------L1-----------------|--------------
12305: TAX --------------------------|-----|--------
12306: */
12307:
12308: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',130);
12309:
12310: insert_fed_tax_row(
12311: tax_rec.emp_fed_tax_rule_id,
12312: l_loc_max_date + 1,
12398: end if;
12399: end loop;
12400:
12401: /* end modifications - dscully 20-jul-2000 */
12402: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',140);
12403: end if; /* for payroll installed/not installed */
12404: end if; /* for location id is not null */
12405:
12406: end if; /* call from assignment form */
12493: p_returned_warning := l_warning;
12494: end check_nra_status;
12495:
12496:
12497: end pay_us_emp_dt_tax_rules;
12498: