DBA Data[Home] [Help]

APPS.PAY_US_GEO_UPD_PKG dependencies on PAY_US_EMP_CITY_TAX_RULES_F

Line 73: pay_us_emp_city_tax_rules_f tr,

69: where ppa.payroll_action_id = pactid;
70:
71: sqlstr := ' select distinct paf.person_id
72: from pay_us_modified_geocodes mg,
73: pay_us_emp_city_tax_rules_f tr,
74: per_all_assignments_f paf,
75: pay_us_states pus
76: where mg.patch_name = '''||ln_upgrade_patch||'''
77: and mg.state_code = pus.state_code

Line 126: pay_us_emp_city_tax_rules_f ectr,

122: ) is
123:
124: SELECT distinct ectr.assignment_id
125: FROM per_all_assignments_f paf,
126: pay_us_emp_city_tax_rules_f ectr,
127: pay_us_modified_geocodes pmod
128: WHERE pmod.state_code = ectr.state_code
129: AND pmod.county_code = ectr.county_code
130: AND pmod.new_county_code is null

Line 720: --Retrieve all changed geocodes on pay_us_emp_city_tax_rules_f table.

716: AND paf.assignment_id = paei.assignment_id;
717:
718: paei_rec paei_cur%ROWTYPE; */
719:
720: --Retrieve all changed geocodes on pay_us_emp_city_tax_rules_f table.
721: --This will be our main 'driving' table.
722: --Added the ASSIGN START and ASSIGN END so that we can multi-thread the
723: --driving cursor
724: --

Line 737: pay_us_emp_city_tax_rules_f ectr,

733: SELECT distinct ectr.jurisdiction_code, ectr.assignment_id,
734: pmod.state_code||'-'||pmod.county_code||'-'||pmod.new_city_code jd_code,
735: paf.person_id, pmod.new_city_code, pmod.process_type, ectr.emp_city_tax_rule_id
736: FROM per_all_assignments_f paf,
737: pay_us_emp_city_tax_rules_f ectr,
738: pay_us_modified_geocodes pmod
739: WHERE pmod.state_code = ectr.state_code
740: AND pmod.county_code = ectr.county_code
741: AND pmod.new_county_code is null

Line 788: --Retrieve all affected rows in PAY_US_EMP_CITY_TAX_RULES_F

784: lv_update_prr varchar2(1);
785:
786: -- main_ ectr_cur%ROWTYPE;
787:
788: --Retrieve all affected rows in PAY_US_EMP_CITY_TAX_RULES_F
789: --This is decoupled from above because we still want the level of
790: --of granularity for city tax records that are changed.
791: --We already have this information we just need to verify if it has
792: --been processed already.

Line 800: FROM pay_us_emp_city_tax_rules_f puecf

796: cursor city_rec_cur (p_new_juri_code VARCHAR2, p_old_juri_code VARCHAR2,
797: p_assign_id NUMBER, p_city_tax_record_id NUMBER)
798: IS
799: SELECT distinct 'Y'
800: FROM pay_us_emp_city_tax_rules_f puecf
801: WHERE puecf.jurisdiction_code = p_old_juri_code
802: AND puecf.assignment_id = p_assign_id
803: AND puecf.emp_city_tax_rule_id = p_city_tax_record_id
804: AND NOT EXISTS (select 'Y' from PAY_US_GEO_UPDATE pugu

Line 808: and pugu.table_name = 'PAY_US_EMP_CITY_TAX_RULES_F'

804: AND NOT EXISTS (select 'Y' from PAY_US_GEO_UPDATE pugu
805: where pugu.assignment_id = p_assign_id
806: and pugu.table_value_id = puecf.emp_city_tax_rule_id
807: and pugu.old_juri_code = p_old_juri_code
808: and pugu.table_name = 'PAY_US_EMP_CITY_TAX_RULES_F'
809: and pugu.process_mode = g_mode
810: and pugu.process_type = g_process_type
811: and pugu.id = g_geo_phase_id);
812:

Line 1356: UPDATE pay_us_emp_city_tax_rules_f

1352: hr_utility.trace('Before update of city tax records for assignment id: '||to_char(p_assign_id));
1353:
1354: IF G_MODE = 'UPGRADE' THEN
1355:
1356: UPDATE pay_us_emp_city_tax_rules_f
1357: SET jurisdiction_code = p_new_juri_code,
1358: city_code = p_new_city_code
1359: WHERE jurisdiction_code = p_old_juri_code
1360: AND assignment_id = p_assign_id

Line 1366: and pugu.table_name = 'PAY_US_EMP_CITY_TAX_RULES_F'

1362: AND NOT EXISTS (select 'Y' from PAY_US_GEO_UPDATE pugu
1363: where pugu.assignment_id = p_assign_id
1364: and pugu.table_value_id = p_city_tax_record_id
1365: and pugu.old_juri_code = p_old_juri_code
1366: and pugu.table_name = 'PAY_US_EMP_CITY_TAX_RULES_F'
1367: and pugu.process_mode = g_mode
1368: and pugu.process_type = g_process_type
1369: and pugu.id = g_geo_phase_id);
1370:

Line 1383: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',

1379: p_person_id => p_person_id,
1380: p_assign_id => p_assign_id,
1381: p_old_juri_code => p_old_juri_code,
1382: p_new_juri_code => p_new_juri_code,
1383: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',
1384: p_id => p_city_tax_record_id);
1385:
1386: /*END IF;*/
1387: ELSE

Line 1398: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',

1394: p_person_id => p_person_id,
1395: p_assign_id => p_assign_id,
1396: p_old_juri_code => p_old_juri_code,
1397: p_new_juri_code => p_new_juri_code,
1398: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',
1399: p_id => p_city_tax_record_id);
1400:
1401: END IF;
1402:

Line 1408: -- rows in the pay_us_emp_city_tax_rules_f table created by geocode updates.

1404:
1405: PROCEDURE del_dup_city_tax_recs IS
1406:
1407: -- This cursor identifies assignment id/jurisdiction pairs that have multiple
1408: -- rows in the pay_us_emp_city_tax_rules_f table created by geocode updates.
1409: -- For example, prior to geocode patch 1105095, these geocodes were in place:
1410: -- Van Nuys, CA: 05-037-3880
1411: -- Woodland Hills, CA: 05-037-6080
1412: -- Los Angeles, CA: 05-037-1900

Line 1422: from pay_us_emp_city_tax_rules_f pect1,

1418:
1419: -- Bug 3319878 -- Changed the query to reduce the cost of the query
1420: CURSOR dup_city_tax_rows is
1421: select distinct pect1.assignment_id, pect1.jurisdiction_code
1422: from pay_us_emp_city_tax_rules_f pect1,
1423: pay_us_emp_city_tax_rules_f pect2
1424: where pect1.assignment_id = pect2.assignment_id
1425: and pect1.jurisdiction_code = pect2.jurisdiction_code
1426: and pect1.emp_city_tax_rule_id < pect2.emp_city_tax_rule_id

Line 1423: pay_us_emp_city_tax_rules_f pect2

1419: -- Bug 3319878 -- Changed the query to reduce the cost of the query
1420: CURSOR dup_city_tax_rows is
1421: select distinct pect1.assignment_id, pect1.jurisdiction_code
1422: from pay_us_emp_city_tax_rules_f pect1,
1423: pay_us_emp_city_tax_rules_f pect2
1424: where pect1.assignment_id = pect2.assignment_id
1425: and pect1.jurisdiction_code = pect2.jurisdiction_code
1426: and pect1.emp_city_tax_rule_id < pect2.emp_city_tax_rule_id
1427: and pect1.assignment_id between P_ASSIGN_START and P_ASSIGN_END ;

Line 1430: from pay_us_emp_city_tax_rules_f pect1

1426: and pect1.emp_city_tax_rule_id < pect2.emp_city_tax_rule_id
1427: and pect1.assignment_id between P_ASSIGN_START and P_ASSIGN_END ;
1428:
1429: /* select distinct pect1.assignment_id, pect1.jurisdiction_code
1430: from pay_us_emp_city_tax_rules_f pect1
1431: where pect1.assignment_id between P_ASSIGN_START and P_ASSIGN_END
1432: and pect1.emp_city_tax_rule_id <
1433: (select pect2.emp_city_tax_rule_id
1434: from pay_us_emp_city_tax_rules_f pect2

Line 1434: from pay_us_emp_city_tax_rules_f pect2

1430: from pay_us_emp_city_tax_rules_f pect1
1431: where pect1.assignment_id between P_ASSIGN_START and P_ASSIGN_END
1432: and pect1.emp_city_tax_rule_id <
1433: (select pect2.emp_city_tax_rule_id
1434: from pay_us_emp_city_tax_rules_f pect2
1435: where pect1.assignment_id = pect2.assignment_id
1436: and pect1.jurisdiction_code = pect2.jurisdiction_code
1437: );
1438: */

Line 1453: DELETE FROM pay_us_emp_city_tax_rules_f pecto

1449:
1450: hr_utility.trace('Deleting dups for Assign ID: ' || to_char(dup_rec.assignment_id) ||
1451: ' Geocode: ' || dup_rec.jurisdiction_code);
1452:
1453: DELETE FROM pay_us_emp_city_tax_rules_f pecto
1454: WHERE pecto.rowid < (SELECT max(pecti.rowid)
1455: FROM pay_us_emp_city_tax_rules_f pecti
1456: WHERE pecti.assignment_id = pecto.assignment_id
1457: AND pecti.assignment_id = dup_rec.assignment_id

Line 1455: FROM pay_us_emp_city_tax_rules_f pecti

1451: ' Geocode: ' || dup_rec.jurisdiction_code);
1452:
1453: DELETE FROM pay_us_emp_city_tax_rules_f pecto
1454: WHERE pecto.rowid < (SELECT max(pecti.rowid)
1455: FROM pay_us_emp_city_tax_rules_f pecti
1456: WHERE pecti.assignment_id = pecto.assignment_id
1457: AND pecti.assignment_id = dup_rec.assignment_id
1458: AND pecti.jurisdiction_code = pecto.jurisdiction_code
1459: AND pecti.jurisdiction_code = dup_rec.jurisdiction_code

Line 2159: from pay_us_emp_city_tax_rules_f pect

2155: p_state_code in varchar2,
2156: p_county_code in varchar2,
2157: p_city_code in varchar2) is
2158: select business_group_id
2159: from pay_us_emp_city_tax_rules_f pect
2160: where pect.assignment_id = p_assignment_id
2161: and pect.state_code = p_state_code
2162: and pect.county_code = p_county_code
2163: and pect.city_code = p_city_code;

Line 2170: from pay_us_emp_city_tax_rules_f peft

2166: cursor c_elig_date (p_assignment_id in number) is
2167: select min(peft.effective_start_date),
2168: max(peft.effective_end_date),
2169: peft.business_group_id
2170: from pay_us_emp_city_tax_rules_f peft
2171: where peft.assignment_id = p_assignment_id
2172: group by peft.business_group_id;
2173:
2174: ld_eff_start_date date;

Line 2178: ln_city_code pay_us_emp_city_tax_rules_f.city_code%TYPE;

2174: ld_eff_start_date date;
2175: ld_eff_end_date date;
2176: ln_state_code pay_us_emp_state_tax_rules_f.state_code%TYPE;
2177: ln_county_code pay_us_emp_county_tax_rules_f.county_code%TYPE;
2178: ln_city_code pay_us_emp_city_tax_rules_f.city_code%TYPE;
2179: ln_old_city_code pay_us_modified_geocodes.old_city_code%TYPE;
2180:
2181: ln_business_group_id number;
2182: ln_check number;

Line 2311: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',

2307: p_person_id => p_person_id,
2308: p_assign_id => p_assign_id,
2309: p_old_juri_code => null,
2310: p_new_juri_code => p_new_juri_code,
2311: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',
2312: p_id => ln_emp_city_tax_rule_id);
2313:
2314: else /* Modified for bug 6864396*/
2315:

Line 2322: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',

2318: p_person_id => p_person_id,
2319: p_assign_id => p_assign_id,
2320: p_old_juri_code => null,
2321: p_new_juri_code => p_new_juri_code,
2322: p_location => 'PAY_US_EMP_CITY_TAX_RULES_F',
2323: p_id => null);
2324:
2325: END IF;
2326:

Line 2981: --Update the pay_us_emp_city_tax_rules_f table.

2977:
2978: hr_utility.set_location('pay_us_geo_upd_pkg.upgrade_geocodes',140);
2979:
2980:
2981: --Update the pay_us_emp_city_tax_rules_f table.
2982:
2983: OPEN city_rec_cur(main_new_juri_code, main_old_juri_code, main_assign_id, main_city_tax_rule_id);
2984: hr_utility.set_location('pay_us_geo_upd_pkg.upgrade_geocodes',145);
2985: