1285: FROM
1286: zx_update_criteria_results results,
1287: ap_tax_codes_all codes,
1288: ar_vat_tax_all_b ar_codes,
1289: ap_tax_recvry_rules_all rec_rules,
1290: financials_system_params_all fsp,
1291: zx_party_tax_profile ptp
1292: WHERE
1293: results.tax_code_id = codes.tax_id
1386: ap_tax_codes_all codes,
1387: ar_vat_tax_all_b ar_codes,
1388: zx_update_criteria_results offset,
1389: financials_system_params_all fsp,
1390: ap_tax_recvry_rules_all rec_rules,
1391: zx_party_tax_profile ptp
1392: WHERE
1393: results.tax_code_id = codes.tax_id
1394: AND results.tax_class = 'INPUT'
1706: FROM
1707: zx_update_criteria_results results,
1708: ap_tax_codes_all codes,
1709: ar_vat_tax_all_b ar_codes,
1710: ap_tax_recvry_rules_all rec_rules,
1711: financials_system_params_all fsp,
1712: zx_party_tax_profile ptp
1713: WHERE
1714: results.tax_code_id = codes.tax_id
1808: ap_tax_codes_all codes,
1809: ar_vat_tax_all_b ar_codes,
1810: zx_update_criteria_results offset,
1811: financials_system_params_all fsp,
1812: ap_tax_recvry_rules_all rec_rules,
1813: zx_party_tax_profile ptp
1814: WHERE
1815: results.tax_code_id = codes.tax_id
1816: AND results.tax_class = 'INPUT'
2136: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
2137: FROM
2138: zx_update_criteria_results results,
2139: ap_tax_codes_all codes,
2140: ap_tax_recvry_rules_all rec_rules,
2141: financials_system_params_all fsp,
2142: zx_party_tax_profile ptp
2143: WHERE
2144: results.tax_code_id = codes.tax_id
2238: zx_update_criteria_results results,
2239: ap_tax_codes_all codes,
2240: zx_update_criteria_results offset,
2241: financials_system_params_all fsp,
2242: ap_tax_recvry_rules_all rec_rules,
2243: zx_party_tax_profile ptp
2244: WHERE
2245: results.tax_code_id = codes.tax_id
2246: AND results.tax_class = 'INPUT'
2561: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
2562: FROM
2563: zx_update_criteria_results results,
2564: ap_tax_codes_all codes,
2565: ap_tax_recvry_rules_all rec_rules,
2566: financials_system_params_all fsp,
2567: zx_party_tax_profile ptp
2568: WHERE
2569: results.tax_code_id = codes.tax_id
2664: zx_update_criteria_results results,
2665: ap_tax_codes_all codes,
2666: zx_update_criteria_results offset,
2667: financials_system_params_all fsp,
2668: ap_tax_recvry_rules_all rec_rules,
2669: zx_party_tax_profile ptp
2670: WHERE
2671: results.tax_code_id = codes.tax_id
2672: AND results.tax_class = 'INPUT'
5907: 'MIGRATED' RECORD_TYPE_CODE
5908: FROM
5909: ap_tax_codes_all codes,
5910: zx_rates_b zx_rates,
5911: ap_tax_recvry_rules_all rules,
5912: ap_tax_recvry_rates_all rates
5913: WHERE
5914: codes.tax_recovery_rule_id = rules.rule_id
5915: AND rules.rule_id = rates.rule_id
9045: RATES.CONCATENATED_SEGMENT_LOW VALUE_LOW ,
9046: RATES.CONCATENATED_SEGMENT_HIGH VALUE_HIGH
9047:
9048: FROM
9049: ap_tax_recvry_rules_all RULES,
9050: ap_tax_recvry_rates_all RATES
9051: WHERE
9052: RULES.rule_id = rates.rule_id
9053: --Added following conditions for Sync process
9073: RATES.condition_value ALPHANUMERIC_VALUE ,
9074: NULL VALUE_LOW ,
9075: NULL VALUE_HIGH
9076: FROM
9077: ap_tax_recvry_rules_all RULES,
9078: ap_tax_recvry_rates_all RATES
9079: WHERE
9080: RULES.rule_id = rates.rule_id
9081: --Added following conditions for Sync process
9189: fnd_global.conc_program_id ,--Program Id
9190: fnd_global.conc_login_id ,--Program Login ID
9191: 1
9192: FROM
9193: ap_tax_recvry_rules_all RULES,
9194: --ap_system_parameters_all ASP,
9195: gl_sets_of_books SOB,
9196: financials_system_params_all FSP,
9197: ap_tax_recvry_rates_all RATES
9210: RATES1.rate_id) CONDITION_GROUP_CODE,
9211: RULES1.RULE_ID,
9212: RATES1.RATE_ID
9213: FROM
9214: ap_tax_recvry_rules_all RULES1,
9215: ap_tax_recvry_rates_all RATES1
9216: WHERE
9217: RULES1.rule_id = RATES1.rule_id
9218: ) TEMP_GROUPS
9320: fnd_global.conc_program_id ,--Program Id
9321: fnd_global.conc_login_id ,--Program Login ID
9322: 1
9323: FROM
9324: ap_tax_recvry_rules_all RULES,
9325: --ap_system_parameters_all ASP,
9326: gl_sets_of_books SOB,
9327: financials_system_params_all FSP,
9328: ap_tax_recvry_rates_all RATES
9342: RATES1.rate_id) CONDITION_GROUP_CODE,
9343: RULES1.RULE_ID,
9344: RATES1.RATE_ID
9345: FROM
9346: ap_tax_recvry_rules_all RULES1,
9347: ap_tax_recvry_rates_all RATES1
9348: WHERE
9349: RULES1.rule_id = RATES1.rule_id
9350: ) TEMP_GROUPS
9508: FROM
9509: (
9510: SELECT
9511: DISTINCT
9512: --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9513:
9514: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9515: group by name having count(*)>1)
9516: THEN
9510: SELECT
9511: DISTINCT
9512: --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9513:
9514: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9515: group by name having count(*)>1)
9516: THEN
9517: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9518:
9513:
9514: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9515: group by name having count(*)>1)
9516: THEN
9517: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9518:
9519: DECODE(SIGN(LENGTHB(RULES.NAME||RATES.TAX)-30),
9520: 1,
9521: SUBSTRB(RULES.NAME,1,24)||ZX_MIGRATE_UTIL.GET_NEXT_SEQID('ZX_RULES_B_S'),
9532: ptp.party_tax_profile_id CONTENT_OWNER_ID
9533: FROM
9534: ap_tax_codes_all codes,
9535: zx_rates_b rates,
9536: ap_tax_recvry_rules_all Rules,
9537: zx_party_tax_profile ptp
9538: WHERE
9539: CODES.TAX_ID = NVL(RATES.SOURCE_ID, RATES.TAX_RATE_ID)
9540: AND CODES.TAX_RECOVERY_RULE_ID = RULES.RULE_ID
9543: --Added following conditions for Sync process
9544: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
9545: AND not exists (select 1 from zx_rules_b
9546: where substrb(tax_rule_code,1,24)
9547: = ( --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9548:
9549: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9550: group by name having count(*)>1)
9551: THEN
9545: AND not exists (select 1 from zx_rules_b
9546: where substrb(tax_rule_code,1,24)
9547: = ( --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9548:
9549: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9550: group by name having count(*)>1)
9551: THEN
9552: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9553:
9548:
9549: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9550: group by name having count(*)>1)
9551: THEN
9552: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9553:
9554: DECODE(SIGN(LENGTHB(RULES.NAME||RATES.TAX)-30),
9555: 1,
9556: SUBSTRB(RULES.NAME,1,24),
9624: FROM
9625: (
9626: SELECT
9627: DISTINCT
9628: --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9629:
9630: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9631: group by name having count(*)>1)
9632: THEN
9626: SELECT
9627: DISTINCT
9628: --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9629:
9630: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9631: group by name having count(*)>1)
9632: THEN
9633: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9634:
9629:
9630: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9631: group by name having count(*)>1)
9632: THEN
9633: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9634:
9635: DECODE(SIGN(LENGTHB(RULES.NAME||RATES.TAX)-30),
9636: 1,
9637: SUBSTRB(RULES.NAME,1,24)||ZX_MIGRATE_UTIL.GET_NEXT_SEQID('ZX_RULES_B_S'),
9648: ptp.party_tax_profile_id CONTENT_OWNER_ID
9649: FROM
9650: ap_tax_codes_all codes,
9651: zx_rates_b rates,
9652: ap_tax_recvry_rules_all Rules,
9653: zx_party_tax_profile ptp
9654: WHERE
9655: CODES.TAX_ID = NVL(RATES.SOURCE_ID, RATES.TAX_RATE_ID)
9656: AND CODES.TAX_RECOVERY_RULE_ID = RULES.RULE_ID
9660: --Added following conditions for Sync process
9661: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
9662: AND not exists (select 1 from zx_rules_b
9663: where substrb(tax_rule_code,1,24)
9664: = ( --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9665:
9666: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9667: group by name having count(*)>1)
9668: THEN
9662: AND not exists (select 1 from zx_rules_b
9663: where substrb(tax_rule_code,1,24)
9664: = ( --check if there exists multiple rows in ap_tax_recvry_rules_all with the same name.
9665:
9666: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9667: group by name having count(*)>1)
9668: THEN
9669: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9670:
9665:
9666: CASE WHEN EXISTS(select NULL from ap_tax_recvry_rules_all where name=RULES.NAME
9667: group by name having count(*)>1)
9668: THEN
9669: --check if ap_tax_recvry_rules_all.NAME || rates.TAX is more than 30 characters in length
9670:
9671: DECODE(SIGN(LENGTHB(RULES.NAME||RATES.TAX)-30),
9672: 1,
9673: SUBSTRB(RULES.NAME,1,24),
9821: ELSE 'Y'
9822: END ENABLED_FLAG --ENABLED_FLAG
9823: FROM
9824: AP_TAX_CODES_ALL CODES,
9825: ap_tax_recvry_rules_all AP_RULES,
9826: ap_tax_recvry_rates_all AP_RATES,
9827: ZX_RATES_B ZX_RATES,
9828: ZX_RULES_B ZX_RULES,
9829: ZX_CONDITION_GROUPS_B GROUPS,
9848: RATES1.rate_id) CONDITION_GROUP_CODE,
9849: RULES1.RULE_ID,
9850: RATES1.RATE_ID
9851: FROM
9852: ap_tax_recvry_rules_all RULES1,
9853: ap_tax_recvry_rates_all RATES1
9854: WHERE
9855: RULES1.rule_id = RATES1.rule_id
9856: ) TEMP_GROUPS
9960: ELSE 'Y'
9961: END ENABLED_FLAG --ENABLED_FLAG
9962: FROM
9963: AP_TAX_CODES_ALL CODES,
9964: ap_tax_recvry_rules_all AP_RULES,
9965: ap_tax_recvry_rates_all AP_RATES,
9966: ZX_RATES_B ZX_RATES,
9967: ZX_RULES_B ZX_RULES,
9968: ZX_CONDITION_GROUPS_B GROUPS,
9988: RATES1.rate_id) CONDITION_GROUP_CODE,
9989: RULES1.RULE_ID,
9990: RATES1.RATE_ID
9991: FROM
9992: ap_tax_recvry_rules_all RULES1,
9993: ap_tax_recvry_rates_all RATES1
9994: WHERE
9995: RULES1.rule_id = RATES1.rule_id
9996: ) TEMP_GROUPS
10740: FROM
10741: zx_update_criteria_results results,
10742: ap_tax_codes_all codes,
10743: ar_vat_tax_all_b ar_codes,
10744: ap_tax_recvry_rules_all rec_rules,
10745: financials_system_params_all fsp,
10746: zx_party_tax_profile ptp
10747: WHERE
10748: results.tax_code_id = tax_id_tab(i)
10842: ap_tax_codes_all codes,
10843: ar_vat_tax_all_b ar_codes,
10844: zx_update_criteria_results offset,
10845: financials_system_params_all fsp,
10846: ap_tax_recvry_rules_all rec_rules,
10847: zx_party_tax_profile ptp
10848: WHERE
10849: results.tax_code_id = tax_id_tab(i)
10850: AND results.tax_code_id = codes.tax_id
11163: FROM
11164: zx_update_criteria_results results,
11165: ap_tax_codes_all codes,
11166: ar_vat_tax_all_b ar_codes,
11167: ap_tax_recvry_rules_all rec_rules,
11168: financials_system_params_all fsp,
11169: zx_party_tax_profile ptp
11170: WHERE
11171: results.tax_code_id = tax_id_tab(i)
11266: ap_tax_codes_all codes,
11267: ar_vat_tax_all_b ar_codes,
11268: zx_update_criteria_results offset,
11269: financials_system_params_all fsp,
11270: ap_tax_recvry_rules_all rec_rules,
11271: zx_party_tax_profile ptp
11272: WHERE
11273: results.tax_code_id = tax_id_tab(i)
11274: AND results.tax_code_id = codes.tax_id
11599: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
11600: FROM
11601: zx_update_criteria_results results,
11602: ap_tax_codes_all codes,
11603: ap_tax_recvry_rules_all rec_rules,
11604: financials_system_params_all fsp,
11605: zx_party_tax_profile ptp
11606: WHERE
11607: results.tax_code_id = tax_id_tab(i)
11701: zx_update_criteria_results results,
11702: ap_tax_codes_all codes,
11703: zx_update_criteria_results offset,
11704: financials_system_params_all fsp,
11705: ap_tax_recvry_rules_all rec_rules,
11706: zx_party_tax_profile ptp
11707: WHERE
11708: results.tax_code_id = tax_id_tab(i)
11709: AND results.tax_code_id = codes.tax_id
12024: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
12025: FROM
12026: zx_update_criteria_results results,
12027: ap_tax_codes_all codes,
12028: ap_tax_recvry_rules_all rec_rules,
12029: financials_system_params_all fsp,
12030: zx_party_tax_profile ptp
12031: WHERE
12032: results.tax_code_id = tax_id_tab(i)
12127: zx_update_criteria_results results,
12128: ap_tax_codes_all codes,
12129: zx_update_criteria_results offset,
12130: financials_system_params_all fsp,
12131: ap_tax_recvry_rules_all rec_rules,
12132: zx_party_tax_profile ptp
12133: WHERE
12134: results.tax_code_id = tax_id_tab(i)
12135: AND results.tax_code_id = codes.tax_id
12467: FROM
12468: zx_update_criteria_results results,
12469: ap_tax_codes_all codes,
12470: ar_vat_tax_all_b ar_codes,
12471: ap_tax_recvry_rules_all rec_rules,
12472: financials_system_params_all fsp,
12473: zx_party_tax_profile ptp
12474: WHERE
12475: results.tax_code_id = codes.tax_id
12568: ap_tax_codes_all codes,
12569: ar_vat_tax_all_b ar_codes,
12570: zx_update_criteria_results offset,
12571: financials_system_params_all fsp,
12572: ap_tax_recvry_rules_all rec_rules,
12573: zx_party_tax_profile ptp
12574: WHERE
12575: results.tax_code_id = codes.tax_id
12576: AND codes.enabled_flag = 'N'
12891: FROM
12892: zx_update_criteria_results results,
12893: ap_tax_codes_all codes,
12894: ar_vat_tax_all_b ar_codes,
12895: ap_tax_recvry_rules_all rec_rules,
12896: financials_system_params_all fsp,
12897: zx_party_tax_profile ptp
12898: WHERE
12899: results.tax_code_id = codes.tax_id
12993: ap_tax_codes_all codes,
12994: ar_vat_tax_all_b ar_codes,
12995: zx_update_criteria_results offset,
12996: financials_system_params_all fsp,
12997: ap_tax_recvry_rules_all rec_rules,
12998: zx_party_tax_profile ptp
12999: WHERE
13000: results.tax_code_id = codes.tax_id
13001: AND codes.enabled_flag = 'N'
13329: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
13330: FROM
13331: zx_update_criteria_results results,
13332: ap_tax_codes_all codes,
13333: ap_tax_recvry_rules_all rec_rules,
13334: financials_system_params_all fsp,
13335: zx_party_tax_profile ptp
13336: WHERE
13337: results.tax_code_id = codes.tax_id
13431: zx_update_criteria_results results,
13432: ap_tax_codes_all codes,
13433: zx_update_criteria_results offset,
13434: financials_system_params_all fsp,
13435: ap_tax_recvry_rules_all rec_rules,
13436: zx_party_tax_profile ptp
13437: WHERE
13438: results.tax_code_id = codes.tax_id
13439: AND codes.enabled_flag = 'N'
13754: codes.DESCRIPTION DESCRIPTION -- Bug 4705196
13755: FROM
13756: zx_update_criteria_results results,
13757: ap_tax_codes_all codes,
13758: ap_tax_recvry_rules_all rec_rules,
13759: financials_system_params_all fsp,
13760: zx_party_tax_profile ptp
13761: WHERE
13762: results.tax_code_id = codes.tax_id
13857: zx_update_criteria_results results,
13858: ap_tax_codes_all codes,
13859: zx_update_criteria_results offset,
13860: financials_system_params_all fsp,
13861: ap_tax_recvry_rules_all rec_rules,
13862: zx_party_tax_profile ptp
13863: WHERE
13864: results.tax_code_id = codes.tax_id
13865: AND codes.enabled_flag = 'N'