DBA Data[Home] [Help]

APPS.ZX_MIGRATE_TAX_DEF dependencies on ZX_RATES_B

Line 208: FROM ZX_RATES_B zx_rates,

204: UPDATE ZX_TAXES_B_TMP TAXES
205: SET PRIMARY_REC_TYPE_RULE_FLAG = 'Y',
206: PRIMARY_REC_RATE_DET_RULE_FLAG = 'Y'
207: WHERE EXISTS (SELECT 1
208: FROM ZX_RATES_B zx_rates,
209: ap_tax_codes_all codes,
210: ap_tax_recvry_rules_all rules
211: WHERE codes.tax_recovery_rule_id = rules.rule_id
212: AND codes.tax_id = nvl(zx_rates.source_id, zx_rates.tax_rate_id)

Line 974: | ZX_RATES_B |

970: | |
971: | DESCRIPTION |
972: | This routine processes AP normal Tax codes and inserts appropriate |
973: | data into the following zx base tables. |
974: | ZX_RATES_B |
975: | ZX_RATES_TL |
976: | ZX_ACCOUNTS |
977: | |
978: | SCOPE - PUBLIC |

Line 1009: INTO zx_rates_b_tmp

1005: IF ID_CLASH = 'Y' THEN
1006: IF L_MULTI_ORG_FLAG = 'Y' THEN
1007:
1008: INSERT ALL
1009: INTO zx_rates_b_tmp
1010: (
1011: TAX_RATE_CODE ,
1012: EFFECTIVE_FROM ,
1013: EFFECTIVE_TO ,

Line 1121: zx_rates_b_s.nextval ,--TAX_RATE_ID

1117: ATTRIBUTE13 ,
1118: ATTRIBUTE14 ,
1119: ATTRIBUTE15 ,
1120: ATTRIBUTE_CATEGORY ,
1121: zx_rates_b_s.nextval ,--TAX_RATE_ID
1122: CONTENT_OWNER_ID ,
1123: fnd_global.user_id ,
1124: SYSDATE ,
1125: fnd_global.user_id ,

Line 1187: zx_rates_b_s.nextval ,--TAX_RATE_ID

1183: )
1184: VALUES
1185: (
1186: ZX_ACCOUNTS_S.nextval ,
1187: zx_rates_b_s.nextval ,--TAX_RATE_ID
1188: 'RATES' ,
1189: LEDGER_ID ,
1190: ORG_ID ,
1191: TAX_ACCOUNT_CCID ,

Line 1321: AND not exists (select 1 from zx_rates_b

1317: AND codes.org_id = ptp.party_id
1318: AND ptp.party_Type_code = 'OU'
1319: --Added following conditions for Sync process
1320: --AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1321: AND not exists (select 1 from zx_rates_b
1322: where source_id = nvl(p_tax_id,codes.tax_id)
1323: )
1324: UNION ALL
1325: SELECT

Line 1421: AND not exists (select 1 from zx_rates_b

1417: AND codes.org_id = ptp.party_id
1418: AND ptp.party_Type_code = 'OU'
1419: --Added following conditions for Sync process
1420: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1421: AND not exists (select 1 from zx_rates_b
1422: where source_id = nvl(p_tax_id,codes.tax_id)
1423: ) ;
1424: ELSE
1425: INSERT ALL

Line 1426: INTO zx_rates_b_tmp

1422: where source_id = nvl(p_tax_id,codes.tax_id)
1423: ) ;
1424: ELSE
1425: INSERT ALL
1426: INTO zx_rates_b_tmp
1427: (
1428: TAX_RATE_CODE ,
1429: EFFECTIVE_FROM ,
1430: EFFECTIVE_TO ,

Line 1538: zx_rates_b_s.nextval ,--TAX_RATE_ID

1534: ATTRIBUTE13 ,
1535: ATTRIBUTE14 ,
1536: ATTRIBUTE15 ,
1537: ATTRIBUTE_CATEGORY ,
1538: zx_rates_b_s.nextval ,--TAX_RATE_ID
1539: CONTENT_OWNER_ID ,
1540: fnd_global.user_id ,
1541: SYSDATE ,
1542: fnd_global.user_id ,

Line 1604: zx_rates_b_s.nextval ,--TAX_RATE_ID

1600: )
1601: VALUES
1602: (
1603: ZX_ACCOUNTS_S.nextval ,
1604: zx_rates_b_s.nextval ,--TAX_RATE_ID
1605: 'RATES' ,
1606: LEDGER_ID ,
1607: ORG_ID ,
1608: TAX_ACCOUNT_CCID ,

Line 1739: AND not exists (select 1 from zx_rates_b

1735: AND codes.org_id =ptp.party_id
1736: AND ptp.party_Type_code = 'OU'
1737: --Added following conditions for Sync process
1738: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1739: AND not exists (select 1 from zx_rates_b
1740: where source_id = nvl(p_tax_id,codes.tax_id)
1741: )
1742: UNION ALL
1743: SELECT

Line 1840: AND not exists (select 1 from zx_rates_b

1836: AND codes.org_id = ptp.party_id
1837: AND ptp.party_Type_code = 'OU'
1838: --Added following conditions for Sync process
1839: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1840: AND not exists (select 1 from zx_rates_b
1841: where source_id = nvl(p_tax_id,codes.tax_id)
1842: ) ;
1843:
1844:

Line 1851: INTO zx_rates_b_tmp

1847:
1848: if l_multi_org_flag = 'Y'
1849: then
1850: INSERT ALL
1851: INTO zx_rates_b_tmp
1852: (
1853: TAX_RATE_CODE ,
1854: EFFECTIVE_FROM ,
1855: EFFECTIVE_TO ,

Line 2168: AND not exists (select 1 from zx_rates_b

2164:
2165: --Added following conditions for Sync process
2166: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2167: --BugFix 3605729 added nvl(source_id, in the following condition.
2168: AND not exists (select 1 from zx_rates_b
2169: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2170: )
2171: UNION ALL
2172: SELECT

Line 2269: AND not exists (select 1 from zx_rates_b

2265:
2266: --Added following conditions for Sync process
2267: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2268: --BugFix 3605729 added nvl(source_id, in the following condition.
2269: AND not exists (select 1 from zx_rates_b
2270: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2271: );
2272: else
2273:

Line 2275: INTO zx_rates_b_tmp

2271: );
2272: else
2273:
2274: INSERT ALL
2275: INTO zx_rates_b_tmp
2276: (
2277: TAX_RATE_CODE ,
2278: EFFECTIVE_FROM ,
2279: EFFECTIVE_TO ,

Line 2593: AND not exists (select 1 from zx_rates_b

2589:
2590: --Added following conditions for Sync process
2591: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2592: --BugFix 3605729 added nvl(source_id, in the following condition.
2593: AND not exists (select 1 from zx_rates_b
2594: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2595: )
2596: UNION ALL
2597: SELECT

Line 2695: AND not exists (select 1 from zx_rates_b

2691:
2692: --Added following conditions for Sync process
2693: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2694: --BugFix 3605729 added nvl(source_id, in the following condition.
2695: AND not exists (select 1 from zx_rates_b
2696: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2697: );
2698:
2699:

Line 2737: ZX_RATES_B RATES,

2733: L.LANGUAGE_CODE,
2734: userenv('LANG'),
2735: avtb.description
2736: FROM FND_LANGUAGES L,
2737: ZX_RATES_B RATES,
2738: ap_tax_codes_all avtb --snoothi changed table name from 'ar_vat_tax_all_b' to 'ap_tax_codes_all' bug#10221534
2739: WHERE
2740: L.INSTALLED_FLAG in ('I', 'B')
2741: AND avtb.tax_id = RATES.tax_rate_id

Line 2775: | ZX_RATES_B |

2771: | |
2772: | DESCRIPTION |
2773: | This routine processes assigned OFFSET Tax codes and inserts |
2774: | appropriate data into the following zx base tables. |
2775: | ZX_RATES_B |
2776: | ZX_RATES_TL |
2777: | ZX_ACCOUNTS |
2778: | |
2779: | SCOPE - PUBLIC |

Line 2808: INTO zx_rates_b_tmp

2804: --BugFix 3605729
2805: IF ID_CLASH = 'Y' THEN
2806: IF L_MULTI_ORG_FLAG = 'Y' THEN
2807: INSERT ALL
2808: INTO zx_rates_b_tmp
2809: (
2810: TAX_RATE_CODE ,
2811: EFFECTIVE_FROM ,
2812: EFFECTIVE_TO ,

Line 2920: zx_rates_b_s.nextval ,--TAX_RATE_ID

2916: ATTRIBUTE13 ,
2917: ATTRIBUTE14 ,
2918: ATTRIBUTE15 ,
2919: ATTRIBUTE_CATEGORY ,
2920: zx_rates_b_s.nextval ,--TAX_RATE_ID
2921: CONTENT_OWNER_ID ,
2922: fnd_global.user_id ,
2923: SYSDATE ,
2924: fnd_global.user_id ,

Line 2986: zx_rates_b_s.nextval ,--TAX_RATE_ID

2982: )
2983: VALUES
2984: (
2985: ZX_ACCOUNTS_S.NEXTVAL,
2986: zx_rates_b_s.nextval ,--TAX_RATE_ID
2987: 'RATES' ,
2988: LEDGER_ID ,
2989: ORG_ID ,
2990: TAX_ACCOUNT_CCID ,

Line 3116: AND not exists (select 1 from zx_rates_b

3112:
3113: --Added following conditions for Sync process
3114: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3115: --Added following conditions for Re-runnability check
3116: AND not exists (select 1 from zx_rates_b
3117: where source_id = nvl(p_tax_id,offset.tax_id)
3118: ) ;
3119: ELSE
3120: INSERT ALL

Line 3121: INTO zx_rates_b_tmp

3117: where source_id = nvl(p_tax_id,offset.tax_id)
3118: ) ;
3119: ELSE
3120: INSERT ALL
3121: INTO zx_rates_b_tmp
3122: (
3123: TAX_RATE_CODE ,
3124: EFFECTIVE_FROM ,
3125: EFFECTIVE_TO ,

Line 3233: zx_rates_b_s.nextval ,--TAX_RATE_ID

3229: ATTRIBUTE13 ,
3230: ATTRIBUTE14 ,
3231: ATTRIBUTE15 ,
3232: ATTRIBUTE_CATEGORY ,
3233: zx_rates_b_s.nextval ,--TAX_RATE_ID
3234: CONTENT_OWNER_ID ,
3235: fnd_global.user_id ,
3236: SYSDATE ,
3237: fnd_global.user_id ,

Line 3299: zx_rates_b_s.nextval ,--TAX_RATE_ID

3295: )
3296: VALUES
3297: (
3298: ZX_ACCOUNTS_S.NEXTVAL ,
3299: zx_rates_b_s.nextval ,--TAX_RATE_ID
3300: 'RATES' ,
3301: LEDGER_ID ,
3302: ORG_ID ,
3303: TAX_ACCOUNT_CCID ,

Line 3430: AND not exists (select 1 from zx_rates_b

3426:
3427: --Added following conditions for Sync process
3428: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3429: --Added following conditions for Re-runnability check
3430: AND not exists (select 1 from zx_rates_b
3431: where source_id = nvl(p_tax_id,offset.tax_id)
3432: ) ;
3433:
3434: END IF;

Line 3441: INTO zx_rates_b_tmp

3437: IF L_MULTI_ORG_FLAG = 'Y'
3438: THEN
3439:
3440: INSERT ALL
3441: INTO zx_rates_b_tmp
3442: (
3443: TAX_RATE_CODE ,
3444: EFFECTIVE_FROM ,
3445: EFFECTIVE_TO ,

Line 3748: AND not exists (select 1 from zx_rates_b

3744:
3745: --Added following conditions for Sync process
3746: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3747: --BugFix 3605729 added nvl(source_id, in the following condition.
3748: AND not exists (select 1 from zx_rates_b
3749: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
3750: )
3751: ;
3752: ELSE

Line 3754: INTO zx_rates_b_tmp

3750: )
3751: ;
3752: ELSE
3753: INSERT ALL
3754: INTO zx_rates_b_tmp
3755: (
3756: TAX_RATE_CODE ,
3757: EFFECTIVE_FROM ,
3758: EFFECTIVE_TO ,

Line 4062: AND not exists (select 1 from zx_rates_b

4058:
4059: --Added following conditions for Sync process
4060: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4061: --BugFix 3605729 added nvl(source_id, in the following condition.
4062: AND not exists (select 1 from zx_rates_b
4063: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
4064: )
4065: ;
4066:

Line 4099: ZX_RATES_B RATES,

4095: L.LANGUAGE_CODE,
4096: userenv('LANG'),
4097: avtb.description
4098: FROM FND_LANGUAGES L,
4099: ZX_RATES_B RATES,
4100: ap_tax_codes_all avtb --snoothi changed table name from 'ar_vat_tax_all_b' to 'ap_tax_codes_all' bug#10221534
4101: WHERE
4102: L.INSTALLED_FLAG in ('I', 'B')
4103: AND avtb.tax_id = RATES.tax_rate_id

Line 4134: | ZX_RATES_B |

4130: | |
4131: | DESCRIPTION |
4132: | This routine processes unassigned OFFSET Tax codes and inserts |
4133: | appropriate data into the following zx base tables. |
4134: | ZX_RATES_B |
4135: | ZX_RATES_TL |
4136: | ZX_ACCOUNTS |
4137: | |
4138: | SCOPE - PUBLIC |

Line 4166: INTO zx_rates_b_tmp

4162: --BugFix 3605729
4163: IF ID_CLASH = 'Y' THEN
4164: IF L_MULTI_ORG_FLAG = 'Y' THEN
4165: INSERT ALL
4166: INTO zx_rates_b_tmp
4167: (
4168: TAX_RATE_CODE ,
4169: EFFECTIVE_FROM ,
4170: EFFECTIVE_TO ,

Line 4278: zx_rates_b_s.nextval ,--TAX_RATE_ID

4274: ATTRIBUTE13 ,
4275: ATTRIBUTE14 ,
4276: ATTRIBUTE15 ,
4277: ATTRIBUTE_CATEGORY ,
4278: zx_rates_b_s.nextval ,--TAX_RATE_ID
4279: CONTENT_OWNER_ID ,
4280: fnd_global.user_id ,
4281: SYSDATE ,
4282: fnd_global.user_id ,

Line 4344: zx_rates_b_s.nextval ,--TAX_RATE_ID

4340: )
4341: VALUES
4342: (
4343: ZX_ACCOUNTS_S.NEXTVAL ,
4344: zx_rates_b_s.nextval ,--TAX_RATE_ID
4345: 'RATES' ,
4346: LEDGER_ID ,
4347: ORG_ID ,
4348: TAX_ACCOUNT_CCID ,

Line 4471: AND not exists (select 1 from zx_rates_b

4467: offset_tax_code_id = offset.tax_id)
4468: --Added following conditions for Sync process
4469: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4470: --Rerunnability check
4471: AND not exists (select 1 from zx_rates_b
4472: where source_id = nvl(p_tax_id,offset.tax_id)
4473: ) ;
4474: ELSE
4475:

Line 4477: INTO zx_rates_b_tmp

4473: ) ;
4474: ELSE
4475:
4476: INSERT ALL
4477: INTO zx_rates_b_tmp
4478: (
4479: TAX_RATE_CODE ,
4480: EFFECTIVE_FROM ,
4481: EFFECTIVE_TO ,

Line 4589: zx_rates_b_s.nextval ,--TAX_RATE_ID

4585: ATTRIBUTE13 ,
4586: ATTRIBUTE14 ,
4587: ATTRIBUTE15 ,
4588: ATTRIBUTE_CATEGORY ,
4589: zx_rates_b_s.nextval ,--TAX_RATE_ID
4590: CONTENT_OWNER_ID ,
4591: fnd_global.user_id ,
4592: SYSDATE ,
4593: fnd_global.user_id ,

Line 4655: zx_rates_b_s.nextval ,--TAX_RATE_ID

4651: )
4652: VALUES
4653: (
4654: ZX_ACCOUNTS_S.NEXTVAL ,
4655: zx_rates_b_s.nextval ,--TAX_RATE_ID
4656: 'RATES' ,
4657: LEDGER_ID ,
4658: ORG_ID ,
4659: TAX_ACCOUNT_CCID ,

Line 4783: AND not exists (select 1 from zx_rates_b

4779: offset_tax_code_id = offset.tax_id)
4780: --Added following conditions for Sync process
4781: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4782: --Rerunnability check
4783: AND not exists (select 1 from zx_rates_b
4784: where source_id = nvl(p_tax_id,offset.tax_id)
4785: ) ;
4786:
4787: END IF;

Line 4793: INTO zx_rates_b_tmp

4789:
4790: IF L_MULTI_ORG_FLAG = 'Y'
4791: THEN
4792: INSERT ALL
4793: INTO zx_rates_b_tmp
4794: (
4795: TAX_RATE_CODE ,
4796: EFFECTIVE_FROM ,
4797: EFFECTIVE_TO ,

Line 5099: AND not exists (select 1 from zx_rates_b

5095: offset_tax_code_id = offset.tax_id)
5096: --Added following conditions for Sync process
5097: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
5098: --BugFix 3605729 added nvl(source_id, in the following condition.
5099: AND not exists (select 1 from zx_rates_b
5100: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
5101: )
5102: ;
5103: ELSE

Line 5106: INTO zx_rates_b_tmp

5102: ;
5103: ELSE
5104:
5105: INSERT ALL
5106: INTO zx_rates_b_tmp
5107: (
5108: TAX_RATE_CODE ,
5109: EFFECTIVE_FROM ,
5110: EFFECTIVE_TO ,

Line 5413: AND not exists (select 1 from zx_rates_b

5409: offset_tax_code_id = offset.tax_id)
5410: --Added following conditions for Sync process
5411: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
5412: --BugFix 3605729 added nvl(source_id, in the following condition.
5413: AND not exists (select 1 from zx_rates_b
5414: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
5415: )
5416: ;
5417: END IF;

Line 5448: ZX_RATES_B RATES,

5444: L.LANGUAGE_CODE,
5445: userenv('LANG'),
5446: avtb.description
5447: FROM FND_LANGUAGES L,
5448: ZX_RATES_B RATES,
5449: ap_tax_codes_all avtb --snoothi changed table name from 'ar_vat_tax_all_b' to 'ap_tax_codes_all' bug#10221534
5450: WHERE
5451: L.INSTALLED_FLAG in ('I', 'B')
5452: AND avtb.tax_id = RATES.tax_rate_id

Line 5482: | ZX_RATES_B |

5478: | |
5479: | DESCRIPTION |
5480: | This routine processes distinct recovery rates,inserts appropriate |
5481: | data into the following zx base tables. |
5482: | ZX_RATES_B |
5483: | ZX_RATES_TL |
5484: | ZX_ACCOUNTS |
5485: | |
5486: | SCOPE - PUBLIC |

Line 5524: ZX_RATES_B

5520: 0,DEFAULT_REC_RATE_CODE,
5521: substrb(DEFAULT_REC_RATE_CODE,1,instrb(DEFAULT_REC_RATE_CODE,'-',1,2)-1)) DEFAULT_REC_RATE_CODE
5522:
5523: FROM
5524: ZX_RATES_B
5525: where record_type_code = 'MIGRATED'
5526: and DEFAULT_REC_RATE_CODE is not null
5527: GROUP BY
5528: TAX_REGIME_CODE,

Line 5538: INSERT INTO zx_rates_b_tmp

5534:
5535: )
5536: LOOP
5537: BEGIN
5538: INSERT INTO zx_rates_b_tmp
5539: (
5540: TAX_RATE_CODE ,
5541: EFFECTIVE_FROM ,
5542: EFFECTIVE_TO ,

Line 5611: ZX_RATES_B_S.NEXTVAL ,

5607: RECOVERY_RULE_CODE ,
5608: DEF_REC_SETTLEMENT_OPTION_CODE ,
5609: RECORD_TYPE_CODE ,
5610: 'INPUT' ,
5611: ZX_RATES_B_S.NEXTVAL ,
5612: CONTENT_OWNER_ID ,
5613: fnd_global.user_id ,
5614: SYSDATE ,
5615: fnd_global.user_id ,

Line 5631: from zx_rates_b

5627: SELECT
5628: SUBSTRB(rates.default_rec_rate_code,1,24) TAX_RATE_CODE, --Bug 4943105
5629: rates.CONTENT_OWNER_ID,
5630: (select min(effective_from)
5631: from zx_rates_b
5632: where record_type_code = 'MIGRATED'
5633: and default_rec_rate_code =
5634: rates.default_rec_rate_code
5635: and tax_regime_code =

Line 5670: zx_rates_b rates

5666: NULL DEF_REC_SETTLEMENT_OPTION_CODE,
5667: 'MIGRATED' RECORD_TYPE_CODE
5668: FROM
5669: ap_tax_codes_all codes,
5670: zx_rates_b rates
5671: WHERE
5672: --BugFix 3480468
5673: rates.default_rec_rate_code is not null
5674: AND rates.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE

Line 5684: AND not exists (select 1 from zx_rates_b_tmp

5680: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
5681: AND codes.tax_id = nvl(rates.source_id, rates.tax_rate_id)
5682: AND rates.record_type_code = 'MIGRATED'
5683: AND ROWNUM = 1
5684: AND not exists (select 1 from zx_rates_b_tmp
5685: where SUBSTRB(tax_rate_code,1,24) = substrb(rates.default_rec_rate_code,1,24) --Bug 4943105
5686: and content_owner_id = rates.content_owner_id
5687: and tax_jurisdiction_code = (SELECT tax_id FROM zx_taxes_b WHERE tax_regime_code = rates.tax_regime_code
5688: AND tax = rates.tax AND content_owner_id = rates.content_owner_id)

Line 5695: update zx_rates_b rates

5691:
5692:
5693: -- Bug 4677185 : Logic to backupdate the Recovery_Tax_Rate_Code created on to the orginal tax rate.
5694: /* Commented for the Bug 4943105 :
5695: update zx_rates_b rates
5696: set rates.DEFAULT_REC_RATE_CODE = ( select rates2.tax_rate_code
5697: from zx_rates_b rates2
5698: where rates2.CONTENT_OWNER_ID = cursor_rec.CONTENT_OWNER_ID
5699: AND rates2.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE

Line 5697: from zx_rates_b rates2

5693: -- Bug 4677185 : Logic to backupdate the Recovery_Tax_Rate_Code created on to the orginal tax rate.
5694: /* Commented for the Bug 4943105 :
5695: update zx_rates_b rates
5696: set rates.DEFAULT_REC_RATE_CODE = ( select rates2.tax_rate_code
5697: from zx_rates_b rates2
5698: where rates2.CONTENT_OWNER_ID = cursor_rec.CONTENT_OWNER_ID
5699: AND rates2.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE
5700: AND rates2.TAX = cursor_rec.TAX
5701: AND rates2.TAX_STATUS_CODE = cursor_rec.TAX_STATUS_CODE

Line 5752: ZX_RATES_B RATES,

5748: L.LANGUAGE_CODE,
5749: userenv('LANG'),
5750: avtb.description
5751: FROM FND_LANGUAGES L,
5752: ZX_RATES_B RATES,
5753: ap_tax_codes_all avtb --snoothi changed table name from 'ar_vat_tax_all_b' to 'ap_tax_codes_all' bug#10221534
5754: WHERE
5755: L.INSTALLED_FLAG in ('I', 'B')
5756: AND avtb.tax_id = RATES.tax_rate_id

Line 5788: | ZX_RATES_B |

5784: | |
5785: | DESCRIPTION |
5786: | This routine processes distinct recovery rates,inserts appropriate |
5787: | data into the following zx base tables. |
5788: | ZX_RATES_B |
5789: | ZX_RATES_TL |
5790: | ZX_ACCOUNTS |
5791: | |
5792: | SCOPE - PUBLIC |

Line 5817: INSERT INTO zx_rates_b_tmp

5813:
5814: --For Tax Recovery Rules associated Recovery Rates.
5815: BEGIN
5816:
5817: INSERT INTO zx_rates_b_tmp
5818: (
5819: TAX_RATE_CODE ,
5820: EFFECTIVE_FROM ,
5821: EFFECTIVE_TO ,

Line 5890: ZX_RATES_B_S.NEXTVAL ,

5886: RECOVERY_RULE_CODE ,
5887: DEF_REC_SETTLEMENT_OPTION_CODE ,
5888: RECORD_TYPE_CODE ,
5889: 'INPUT' ,
5890: ZX_RATES_B_S.NEXTVAL ,
5891: CONTENT_OWNER_ID ,
5892: fnd_global.user_id ,
5893: SYSDATE ,
5894: fnd_global.user_id ,

Line 5941: zx_rates_b zx_rates,

5937: NULL DEF_REC_SETTLEMENT_OPTION_CODE,
5938: 'MIGRATED' RECORD_TYPE_CODE
5939: FROM
5940: ap_tax_codes_all codes,
5941: zx_rates_b zx_rates,
5942: ap_tax_recvry_rules_all rules,
5943: ap_tax_recvry_rates_all rates
5944: WHERE
5945: codes.tax_recovery_rule_id = rules.rule_id

Line 5951: AND not exists (select 1 from zx_rates_b

5947: --Added following conditions for Sync process
5948:
5949: AND codes.tax_id = nvl(zx_rates.source_id, zx_rates.tax_rate_id)
5950: AND zx_rates.record_type_code = 'MIGRATED'
5951: AND not exists (select 1 from zx_rates_b
5952: where decode(instrb(tax_rate_code,'-',1,2),
5953: 0,tax_rate_code,
5954: substrb(tax_rate_code,1,instrb(tax_rate_code,'-',1,2)-1)) = 'STANDARD-'|| rates.recovery_rate -- Bug 4644762
5955: and rate_type_code = 'RECOVERY'

Line 5987: | ZX_RATES_B |

5983: | DESCRIPTION |
5984: | This routine creates an adhoc recovery rate with tax_rate_code |
5985: | starting with AD_HOC_RECOVERY for each tax for which tax recovery |
5986: | is allowed and populates the following ZX base tables. |
5987: | ZX_RATES_B |
5988: | ZX_RATES_TL |
5989: | SCOPE - PRIVATE |
5990: | |
5991: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 6011: INSERT INTO zx_rates_b_tmp

6007: END IF;
6008:
6009: -- For adhoc Recovery Rate creation.
6010: BEGIN
6011: INSERT INTO zx_rates_b_tmp
6012: (
6013: TAX_RATE_CODE ,
6014: EFFECTIVE_FROM ,
6015: EFFECTIVE_TO ,

Line 6081: ZX_RATES_B_S.NEXTVAL ,

6077: RECOVERY_RULE_CODE ,
6078: DEF_REC_SETTLEMENT_OPTION_CODE ,
6079: RECORD_TYPE_CODE ,
6080: 'INPUT' ,
6081: ZX_RATES_B_S.NEXTVAL ,
6082: CONTENT_OWNER_ID ,
6083: fnd_global.user_id ,
6084: SYSDATE ,
6085: fnd_global.user_id ,

Line 6129: AND not exists (select 1 from zx_rates_b

6125: zx_taxes_b taxes
6126: WHERE taxes.ALLOW_RECOVERABILITY_FLAG = 'Y'
6127: AND taxes.RECORD_TYPE_CODE = 'MIGRATED'
6128: -- Re-runnability Check
6129: AND not exists (select 1 from zx_rates_b
6130: WHERE TAX_RATE_CODE = 'AD_HOC_RECOVERY'
6131: AND CONTENT_OWNER_ID = taxes.content_owner_id
6132: AND tax_regime_code = taxes.tax_regime_code
6133: AND TAX = taxes.tax

Line 6139: arp_util_tax.debug('EXCEPTION: Create_Adhoc_Recovery_Rates-insert into ZX_RATES_B ');

6135: ) );
6136: EXCEPTION
6137: WHEN OTHERS THEN
6138: IF PG_DEBUG = 'Y' THEN
6139: arp_util_tax.debug('EXCEPTION: Create_Adhoc_Recovery_Rates-insert into ZX_RATES_B ');
6140: arp_util_tax.debug(sqlerrm);
6141: END IF;
6142: END;
6143:

Line 6173: ZX_RATES_B RATES

6169: fnd_global.conc_login_id ,
6170: L.LANGUAGE_CODE,
6171: userenv('LANG')
6172: FROM FND_LANGUAGES L,
6173: ZX_RATES_B RATES
6174: WHERE
6175: L.INSTALLED_FLAG in ('I', 'B')
6176: AND RATES.RECORD_TYPE_CODE = 'MIGRATED'
6177: AND not exists

Line 6203: | above inserted data into ZX_RATES_B. |

6199: | create_zx_statuses |
6200: | |
6201: | DESCRIPTION |
6202: | This routine inserts data into ZX_STATUS_B,_TL based on the |
6203: | above inserted data into ZX_RATES_B. |
6204: | |
6205: | SCOPE - PUBLIC |
6206: | |
6207: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 6325: FROM ZX_RATES_B rates

6321: CONTENT_OWNER_ID,
6322: TAX,
6323: TAX_STATUS_CODE,
6324: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6325: FROM ZX_RATES_B rates
6326: WHERE
6327: rates.record_type_code = 'MIGRATED'
6328: AND rates.tax_status_code IS NOT NULL
6329: --Added following conditions for Sync process

Line 6462: ZX_RATES_B rates,

6458: CONTENT_OWNER_ID,
6459: TAX,
6460: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6461: FROM
6462: ZX_RATES_B rates,
6463: ap_tax_codes_all codes,
6464: zx_party_tax_profile ptp
6465: WHERE
6466: rates.record_type_code = 'MIGRATED' AND

Line 6595: ZX_RATES_B rates,

6591: CONTENT_OWNER_ID,
6592: TAX,
6593: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6594: FROM
6595: ZX_RATES_B rates,
6596: ap_tax_codes_all codes,
6597: zx_party_tax_profile ptp
6598: WHERE
6599: rates.record_type_code = 'MIGRATED' AND

Line 6670: ZX_RATES_B rates

6666: FND_LANGUAGES L,
6667: ZX_STATUS_B Status,
6668: JA_LOOKUPS lookups,
6669: ap_tax_codes_all codes,
6670: ZX_RATES_B rates
6671: WHERE
6672: L.INSTALLED_FLAG in ('I', 'B')
6673: AND Status.RECORD_TYPE_CODE = 'MIGRATED'
6674: AND codes.tax_id = nvl(rates.source_id, rates.tax_rate_id)

Line 6764: | above inserted data into ZX_RATES_B. |

6760: | create_zx_taxes |
6761: | |
6762: | DESCRIPTION |
6763: | This routine inserts data into ZX_TAXES_B,_TL based on the |
6764: | above inserted data into ZX_RATES_B. |
6765: | |
6766: | SCOPE - PUBLIC |
6767: | |
6768: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 6919: from zx_rates_b rates, ap_tax_codes_all codes

6915: (select codes.tax_type tax_type_code,
6916: rates.tax_regime_code tax_regime_code,
6917: rates.tax tax,
6918: rates.content_owner_id content_owner_id
6919: from zx_rates_b rates, ap_tax_codes_all codes
6920: where codes.tax_id = rates.source_id --ID Clash
6921: AND rates.tax_class = 'INPUT'
6922: AND rates.record_type_code = 'MIGRATED'
6923: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 6983: EXISTS (select 1 from zx_rates_b active_rate

6979: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
6980: 'N' ,--REPORTING_ONLY_FLAG
6981: 'N' ,--AUTO_PRVN_FLAG
6982: CASE WHEN
6983: EXISTS (select 1 from zx_rates_b active_rate
6984: where active_rate.TAX = l_TAX
6985: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
6986: and sysdate between active_rate.effective_from
6987: and nvl(active_rate.effective_to,sysdate))

Line 7016: from zx_rates_b

7012: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
7013: --BugFix 3493419
7014: DECODE(l_CONTENT_OWNER_ID,
7015: (select min(CONTENT_OWNER_ID)
7016: from zx_rates_b
7017: where tax = l_TAX
7018: and tax_regime_code = l_TAX_REGIME_CODE
7019: and RECORD_TYPE_CODE = 'MIGRATED'),
7020: 'Y',

Line 7068: from zx_rates_b rates, ap_tax_codes_all codes

7064: (select codes.tax_type tax_type_code,
7065: rates.tax_regime_code tax_regime_code,
7066: rates.tax tax,
7067: rates.content_owner_id content_owner_id
7068: from zx_rates_b rates, ap_tax_codes_all codes
7069: where codes.tax_id = rates.source_id --ID Clash
7070: AND rates.tax_class = 'INPUT'
7071: AND rates.record_type_code = 'MIGRATED'
7072: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7126: ZX_RATES_B RATES,

7122: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7123: -- DECODE(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7124: NULL DEFAULT_EXCHANGE_RATE_TYPE
7125: FROM
7126: ZX_RATES_B RATES,
7127: AP_TAX_CODES_ALL CODES,
7128: GL_SETS_OF_BOOKS SOB,
7129: AP_SYSTEM_PARAMETERS_ALL ASP,
7130: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 7310: from zx_rates_b rates, ap_tax_codes_all codes

7306: (select codes.tax_type tax_type_code,
7307: rates.tax_regime_code tax_regime_code,
7308: rates.tax tax,
7309: rates.content_owner_id content_owner_id
7310: from zx_rates_b rates, ap_tax_codes_all codes
7311: where codes.tax_id = rates.source_id --ID Clash
7312: AND rates.tax_class = 'INPUT'
7313: AND rates.record_type_code = 'MIGRATED'
7314: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7374: EXISTS (select 1 from zx_rates_b active_rate

7370: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
7371: 'N' ,--REPORTING_ONLY_FLAG
7372: 'N' ,--AUTO_PRVN_FLAG
7373: CASE WHEN
7374: EXISTS (select 1 from zx_rates_b active_rate
7375: where active_rate.TAX = l_TAX
7376: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
7377: and sysdate between active_rate.effective_from
7378: and nvl(active_rate.effective_to,sysdate))

Line 7408: from zx_rates_b

7404: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
7405: --BugFix 3493419
7406: DECODE(l_CONTENT_OWNER_ID,
7407: (select min(CONTENT_OWNER_ID)
7408: from zx_rates_b
7409: where tax = l_TAX
7410: and tax_regime_code = l_TAX_REGIME_CODE
7411: and RECORD_TYPE_CODE = 'MIGRATED'),
7412: 'Y',

Line 7460: from zx_rates_b rates, ap_tax_codes_all codes

7456: (select codes.tax_type tax_type_code,
7457: rates.tax_regime_code tax_regime_code,
7458: rates.tax tax,
7459: rates.content_owner_id content_owner_id
7460: from zx_rates_b rates, ap_tax_codes_all codes
7461: where codes.tax_id = rates.source_id --ID Clash
7462: AND rates.tax_class = 'INPUT'
7463: AND rates.record_type_code = 'MIGRATED'
7464: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7518: ZX_RATES_B RATES,

7514: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7515: -- DECODE(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7516: NULL DEFAULT_EXCHANGE_RATE_TYPE
7517: FROM
7518: ZX_RATES_B RATES,
7519: AP_TAX_CODES_ALL CODES,
7520: GL_SETS_OF_BOOKS SOB,
7521: AP_SYSTEM_PARAMETERS_ALL ASP,
7522: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 7717: from zx_rates_b rates, ap_tax_codes_all codes

7713: (select codes.tax_type tax_type_code,
7714: rates.tax_regime_code tax_regime_code,
7715: rates.tax tax,
7716: rates.content_owner_id content_owner_id
7717: from zx_rates_b rates, ap_tax_codes_all codes
7718: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
7719: group by rates.tax_regime_code, rates.tax, rates.content_owner_id,codes.tax_type
7720: )
7721: where tax_regime_code = l_tax_regime_code

Line 7778: EXISTS (select 1 from zx_rates_b active_rate

7774: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
7775: 'N' ,--REPORTING_ONLY_FLAG
7776: 'N' ,--AUTO_PRVN_FLAG
7777: CASE WHEN
7778: EXISTS (select 1 from zx_rates_b active_rate
7779: where active_rate.TAX = lookups.lookup_code
7780: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
7781: and sysdate between active_rate.effective_from
7782: and nvl(active_rate.effective_to,sysdate))

Line 7811: from zx_rates_b

7807: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
7808: --BugFix 3493419
7809: DECODE(l_CONTENT_OWNER_ID,
7810: (select min(CONTENT_OWNER_ID)
7811: from zx_rates_b
7812: where tax = lookups.lookup_code
7813: and tax_regime_code = l_TAX_REGIME_CODE
7814: and RECORD_TYPE_CODE = 'MIGRATED'),
7815: 'Y',

Line 7865: from zx_rates_b rates, ap_tax_codes_all codes

7861: codes.tax_type tax_type_code,
7862: rates.tax_regime_code tax_regime_code,
7863: rates.tax tax,
7864: rates.content_owner_id content_owner_id
7865: from zx_rates_b rates, ap_tax_codes_all codes
7866: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
7867: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type
7868: )
7869: where tax_regime_code = l_tax_regime_code

Line 7920: ZX_RATES_B RATES,

7916: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7917: -- decode(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7918: NULL DEFAULT_EXCHANGE_RATE_TYPE
7919: FROM
7920: ZX_RATES_B RATES,
7921: AP_TAX_CODES_ALL CODES,
7922: GL_SETS_OF_BOOKS SOB,
7923: AP_SYSTEM_PARAMETERS_ALL ASP,
7924: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 8142: from zx_rates_b rates, ap_tax_codes_all codes

8138: (select codes.tax_type tax_type_code,
8139: rates.tax_regime_code tax_regime_code,
8140: rates.tax tax,
8141: rates.content_owner_id content_owner_id
8142: from zx_rates_b rates, ap_tax_codes_all codes
8143: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
8144: group by rates.tax_regime_code, rates.tax, rates.content_owner_id,codes.tax_type
8145: )
8146: where tax_regime_code = l_tax_regime_code

Line 8203: EXISTS (select 1 from zx_rates_b active_rate

8199: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
8200: 'N' ,--REPORTING_ONLY_FLAG
8201: 'N' ,--AUTO_PRVN_FLAG
8202: CASE WHEN
8203: EXISTS (select 1 from zx_rates_b active_rate
8204: where active_rate.TAX = lookups.lookup_code
8205: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
8206: and sysdate between active_rate.effective_from
8207: and nvl(active_rate.effective_to,sysdate))

Line 8236: from zx_rates_b

8232: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
8233: --BugFix 3493419
8234: DECODE(l_CONTENT_OWNER_ID,
8235: (select min(CONTENT_OWNER_ID)
8236: from zx_rates_b
8237: where tax = lookups.lookup_code
8238: and tax_regime_code = l_TAX_REGIME_CODE
8239: and RECORD_TYPE_CODE = 'MIGRATED'),
8240: 'Y',

Line 8290: from zx_rates_b rates, ap_tax_codes_all codes

8286: codes.tax_type tax_type_code,
8287: rates.tax_regime_code tax_regime_code,
8288: rates.tax tax,
8289: rates.content_owner_id content_owner_id
8290: from zx_rates_b rates, ap_tax_codes_all codes
8291: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
8292: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type
8293: )
8294: where tax_regime_code = l_tax_regime_code

Line 8345: ZX_RATES_B RATES,

8341: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
8342: -- decode(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
8343: NULL DEFAULT_EXCHANGE_RATE_TYPE
8344: FROM
8345: ZX_RATES_B RATES,
8346: AP_TAX_CODES_ALL CODES,
8347: GL_SETS_OF_BOOKS SOB,
8348: AP_SYSTEM_PARAMETERS_ALL ASP,
8349: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 8494: zx_rates_b rates,

8490: fnd_global.conc_login_id ,
8491: taxes.tax_id
8492: FROM
8493: zx_taxes_b taxes,
8494: zx_rates_b rates,
8495: fnd_lookup_values flv,
8496: ap_tax_codes_all ap_code
8497: WHERE
8498: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8544: zx_rates_b rates,

8540: fnd_global.conc_login_id ,
8541: taxes.tax_id
8542: FROM
8543: zx_taxes_b taxes,
8544: zx_rates_b rates,
8545: fnd_lookup_values flv,
8546: ap_tax_codes_all ap_code
8547: WHERE
8548: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8591: zx_rates_b rates,

8587: fnd_global.conc_login_id ,
8588: taxes.tax_id
8589: FROM
8590: zx_taxes_b taxes,
8591: zx_rates_b rates,
8592: fnd_lookup_values flv,
8593: ap_tax_codes_all ap_code
8594: WHERE
8595: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8638: zx_rates_b rates,

8634: fnd_global.conc_login_id ,
8635: taxes.tax_id
8636: FROM
8637: zx_taxes_b taxes,
8638: zx_rates_b rates,
8639: fnd_lookup_values flv,
8640: ap_tax_codes_all ap_code
8641: WHERE
8642: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 9831: zx_rates_b rates,

9827: where rule_id = RULES.rule_id) EFFECTIVE_FROM,
9828: ptp.party_tax_profile_id CONTENT_OWNER_ID
9829: FROM
9830: ap_tax_codes_all codes,
9831: zx_rates_b rates,
9832: ap_tax_recvry_rules_all Rules,
9833: zx_party_tax_profile ptp
9834: WHERE
9835: CODES.TAX_ID = NVL(RATES.SOURCE_ID, RATES.TAX_RATE_ID)

Line 9944: zx_rates_b rates,

9940: where rule_id = RULES.rule_id) EFFECTIVE_FROM,
9941: ptp.party_tax_profile_id CONTENT_OWNER_ID
9942: FROM
9943: ap_tax_codes_all codes,
9944: zx_rates_b rates,
9945: ap_tax_recvry_rules_all Rules,
9946: zx_party_tax_profile ptp
9947: WHERE
9948: CODES.TAX_ID = NVL(RATES.SOURCE_ID, RATES.TAX_RATE_ID)

Line 10011: zx_rates_b rates,

10007: ,rules.description
10008: ,l.LANGUAGE_CODE
10009: FROM ap_tax_codes_all codes,
10010: ap_tax_recvry_rules_all Rules,
10011: zx_rates_b rates,
10012: zx_rules_b b,
10013: fnd_languages L
10014: WHERE l.installed_flag in ('I', 'B')
10015: AND codes.TAX_RECOVERY_RULE_ID = RULES.RULE_ID

Line 10124: ZX_RATES_B ZX_RATES,

10120: FROM
10121: AP_TAX_CODES_ALL CODES,
10122: ap_tax_recvry_rules_all AP_RULES,
10123: ap_tax_recvry_rates_all AP_RATES,
10124: ZX_RATES_B ZX_RATES,
10125: ZX_RULES_B ZX_RULES,
10126: ZX_CONDITION_GROUPS_B GROUPS,
10127: zx_party_tax_profile ptp
10128: WHERE

Line 10280: ZX_RATES_B ZX_RATES,

10276: FROM
10277: AP_TAX_CODES_ALL CODES,
10278: ap_tax_recvry_rules_all AP_RULES,
10279: ap_tax_recvry_rates_all AP_RATES,
10280: ZX_RATES_B ZX_RATES,
10281: ZX_RULES_B ZX_RULES,
10282: ZX_CONDITION_GROUPS_B GROUPS,
10283: zx_party_tax_profile ptp
10284: WHERE

Line 10388: ZX_RATES_B rates,

10384: ledger_id,
10385: accounts.internal_organization_id
10386: FROM
10387: ZX_ACCOUNTS accounts,
10388: ZX_RATES_B rates,
10389: ZX_TAXES_B taxes
10390: WHERE taxes.tax = rates.tax
10391: and taxes.tax_regime_code = rates.tax_regime_code
10392: and taxes.content_owner_id = rates.content_owner_id

Line 10655: | into zx_rates_b |

10651: | migrate_disabled_tax_codes |
10652: | |
10653: | DESCRIPTION |
10654: | This routine is used to migrate disabled tax codes with overlapping |
10655: | into zx_rates_b |
10656: | |
10657: | SCOPE - PUBLIC |
10658: | |
10659: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 10778: INTO zx_rates_b_tmp

10774: IF L_MULTI_ORG_FLAG = 'Y'
10775: THEN
10776:
10777: INSERT ALL
10778: INTO zx_rates_b_tmp
10779: (
10780: TAX_RATE_CODE ,
10781: EFFECTIVE_FROM ,
10782: EFFECTIVE_TO ,

Line 10890: zx_rates_b_s.nextval ,--TAX_RATE_ID

10886: ATTRIBUTE13 ,
10887: ATTRIBUTE14 ,
10888: ATTRIBUTE15 ,
10889: ATTRIBUTE_CATEGORY ,
10890: zx_rates_b_s.nextval ,--TAX_RATE_ID
10891: CONTENT_OWNER_ID ,
10892: fnd_global.user_id ,
10893: SYSDATE ,
10894: fnd_global.user_id ,

Line 10956: zx_rates_b_s.nextval ,--TAX_RATE_ID

10952: )
10953: VALUES
10954: (
10955: ZX_ACCOUNTS_S.nextval ,
10956: zx_rates_b_s.nextval ,--TAX_RATE_ID
10957: 'RATES' ,
10958: LEDGER_ID ,
10959: ORG_ID ,
10960: TAX_ACCOUNT_CCID ,

Line 11093: AND not exists (select 1 from zx_rates_b

11089: AND codes.org_id = ptp.party_id
11090: AND ptp.party_Type_code = 'OU'
11091: --Added following conditions for Sync process
11092: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11093: AND not exists (select 1 from zx_rates_b
11094: where source_id = nvl(p_tax_id,codes.tax_id)
11095: )
11096: UNION ALL
11097: SELECT

Line 11194: AND not exists (select 1 from zx_rates_b

11190: AND codes.org_id = ptp.party_id
11191: AND ptp.party_Type_code = 'OU'
11192: --Added following conditions for Sync process
11193: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11194: AND not exists (select 1 from zx_rates_b
11195: where source_id = nvl(p_tax_id,codes.tax_id)
11196: ) ;
11197:
11198: ELSE

Line 11200: INTO zx_rates_b_tmp

11196: ) ;
11197:
11198: ELSE
11199: INSERT ALL
11200: INTO zx_rates_b_tmp
11201: (
11202: TAX_RATE_CODE ,
11203: EFFECTIVE_FROM ,
11204: EFFECTIVE_TO ,

Line 11312: zx_rates_b_s.nextval ,--TAX_RATE_ID

11308: ATTRIBUTE13 ,
11309: ATTRIBUTE14 ,
11310: ATTRIBUTE15 ,
11311: ATTRIBUTE_CATEGORY ,
11312: zx_rates_b_s.nextval ,--TAX_RATE_ID
11313: CONTENT_OWNER_ID ,
11314: fnd_global.user_id ,
11315: SYSDATE ,
11316: fnd_global.user_id ,

Line 11378: zx_rates_b_s.nextval ,--TAX_RATE_ID

11374: )
11375: VALUES
11376: (
11377: ZX_ACCOUNTS_S.nextval ,
11378: zx_rates_b_s.nextval ,--TAX_RATE_ID
11379: 'RATES' ,
11380: LEDGER_ID ,
11381: ORG_ID ,
11382: TAX_ACCOUNT_CCID ,

Line 11516: AND not exists (select 1 from zx_rates_b

11512: AND codes.org_id = ptp.party_id
11513: AND ptp.party_Type_code = 'OU'
11514: --Added following conditions for Sync process
11515: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11516: AND not exists (select 1 from zx_rates_b
11517: where source_id = nvl(p_tax_id,codes.tax_id)
11518: )
11519: UNION ALL
11520: SELECT

Line 11618: AND not exists (select 1 from zx_rates_b

11614: AND codes.org_id = ptp.party_id
11615: AND ptp.party_Type_code = 'OU'
11616: --Added following conditions for Sync process
11617: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11618: AND not exists (select 1 from zx_rates_b
11619: where source_id = nvl(p_tax_id,codes.tax_id)
11620: ) ;
11621: END IF;
11622: EXCEPTION WHEN OTHERS THEN

Line 11634: INTO zx_rates_b_tmp

11630: IF L_MULTI_ORG_FLAG = 'Y'
11631: THEN
11632:
11633: INSERT ALL
11634: INTO zx_rates_b_tmp
11635: (
11636: TAX_RATE_CODE ,
11637: EFFECTIVE_FROM ,
11638: EFFECTIVE_TO ,

Line 11951: AND not exists (select 1 from zx_rates_b

11947:
11948: --Added following conditions for Sync process
11949: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11950: --BugFix 3605729 added nvl(source_id, in the following condition.
11951: AND not exists (select 1 from zx_rates_b
11952: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
11953: )
11954: UNION ALL
11955: SELECT

Line 12052: AND not exists (select 1 from zx_rates_b

12048:
12049: --Added following conditions for Sync process
12050: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12051: --BugFix 3605729 added nvl(source_id, in the following condition.
12052: AND not exists (select 1 from zx_rates_b
12053: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
12054: );
12055: ELSE
12056:

Line 12058: INTO zx_rates_b_tmp

12054: );
12055: ELSE
12056:
12057: INSERT ALL
12058: INTO zx_rates_b_tmp
12059: (
12060: TAX_RATE_CODE ,
12061: EFFECTIVE_FROM ,
12062: EFFECTIVE_TO ,

Line 12376: AND not exists (select 1 from zx_rates_b

12372:
12373: --Added following conditions for Sync process
12374: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12375: --BugFix 3605729 added nvl(source_id, in the following condition.
12376: AND not exists (select 1 from zx_rates_b
12377: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
12378: )
12379: UNION ALL
12380: SELECT

Line 12478: AND not exists (select 1 from zx_rates_b

12474:
12475: --Added following conditions for Sync process
12476: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12477: --BugFix 3605729 added nvl(source_id, in the following condition.
12478: AND not exists (select 1 from zx_rates_b
12479: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
12480: );
12481:
12482:

Line 12501: INTO zx_rates_b_tmp

12497: IF L_MULTI_ORG_FLAG = 'Y' THEN
12498:
12499: BEGIN
12500: INSERT ALL
12501: INTO zx_rates_b_tmp
12502: (
12503: TAX_RATE_CODE ,
12504: EFFECTIVE_FROM ,
12505: EFFECTIVE_TO ,

Line 12613: zx_rates_b_s.nextval ,--TAX_RATE_ID

12609: ATTRIBUTE13 ,
12610: ATTRIBUTE14 ,
12611: ATTRIBUTE15 ,
12612: ATTRIBUTE_CATEGORY ,
12613: zx_rates_b_s.nextval ,--TAX_RATE_ID
12614: CONTENT_OWNER_ID ,
12615: fnd_global.user_id ,
12616: SYSDATE ,
12617: fnd_global.user_id ,

Line 12679: zx_rates_b_s.nextval ,--TAX_RATE_ID

12675: )
12676: VALUES
12677: (
12678: ZX_ACCOUNTS_S.nextval ,
12679: zx_rates_b_s.nextval ,--TAX_RATE_ID
12680: 'RATES' ,
12681: LEDGER_ID ,
12682: ORG_ID ,
12683: TAX_ACCOUNT_CCID ,

Line 12816: AND not exists (select 1 from zx_rates_b

12812: AND codes.org_id = ptp.party_id
12813: AND ptp.party_Type_code = 'OU'
12814: --Added following conditions for Sync process
12815: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12816: AND not exists (select 1 from zx_rates_b
12817: where source_id = nvl(p_tax_id,codes.tax_id)
12818: )
12819: UNION ALL
12820: SELECT

Line 12916: AND not exists (select 1 from zx_rates_b

12912: AND codes.org_id = ptp.party_id
12913: AND ptp.party_Type_code = 'OU'
12914: --Added following conditions for Sync process
12915: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12916: AND not exists (select 1 from zx_rates_b
12917: where source_id = nvl(p_tax_id,codes.tax_id)
12918: ) ;
12919: EXCEPTION WHEN OTHERS THEN
12920: arp_util_tax.debug('Caught an error in the id clash portion for the disabled tax codes

Line 12926: INTO zx_rates_b_tmp

12922: END;
12923: ELSE
12924: BEGIN
12925: INSERT ALL
12926: INTO zx_rates_b_tmp
12927: (
12928: TAX_RATE_CODE ,
12929: EFFECTIVE_FROM ,
12930: EFFECTIVE_TO ,

Line 13037: zx_rates_b_s.nextval ,--TAX_RATE_ID

13033: ATTRIBUTE13 ,
13034: ATTRIBUTE14 ,
13035: ATTRIBUTE15 ,
13036: ATTRIBUTE_CATEGORY ,
13037: zx_rates_b_s.nextval ,--TAX_RATE_ID
13038: CONTENT_OWNER_ID ,
13039: fnd_global.user_id ,
13040: SYSDATE ,
13041: fnd_global.user_id ,

Line 13102: zx_rates_b_s.nextval ,--TAX_RATE_ID

13098: )
13099: VALUES
13100: (
13101: ZX_ACCOUNTS_S.nextval ,
13102: zx_rates_b_s.nextval ,--TAX_RATE_ID
13103: 'RATES' ,
13104: LEDGER_ID ,
13105: ORG_ID ,
13106: TAX_ACCOUNT_CCID ,

Line 13240: AND not exists (select 1 from zx_rates_b

13236: AND codes.org_id = ptp.party_id
13237: AND ptp.party_Type_code = 'OU'
13238: --Added following conditions for Sync process
13239: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13240: AND not exists (select 1 from zx_rates_b
13241: where source_id = nvl(p_tax_id,codes.tax_id)
13242: )
13243: UNION ALL
13244: SELECT

Line 13341: AND not exists (select 1 from zx_rates_b

13337: AND codes.org_id = ptp.party_id
13338: AND ptp.party_Type_code = 'OU'
13339: --Added following conditions for Sync process
13340: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13341: AND not exists (select 1 from zx_rates_b
13342: where source_id = nvl(p_tax_id,codes.tax_id)
13343: ) ;
13344: EXCEPTION WHEN OTHERS THEN
13345: arp_util_tax.debug('Caught an error in the id clash portion for the disabled tax codes

Line 13360: INTO zx_rates_b_tmp

13356: IF L_MULTI_ORG_FLAG = 'Y'
13357: THEN
13358:
13359: INSERT ALL
13360: INTO zx_rates_b_tmp
13361: (
13362: TAX_RATE_CODE ,
13363: EFFECTIVE_FROM ,
13364: EFFECTIVE_TO ,

Line 13677: AND not exists (select 1 from zx_rates_b

13673:
13674: --Added following conditions for Sync process
13675: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13676: --BugFix 3605729 added nvl(source_id, in the following condition.
13677: AND not exists (select 1 from zx_rates_b
13678: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
13679: )
13680: UNION ALL
13681: SELECT

Line 13778: AND not exists (select 1 from zx_rates_b

13774:
13775: --Added following conditions for Sync process
13776: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13777: --BugFix 3605729 added nvl(source_id, in the following condition.
13778: AND not exists (select 1 from zx_rates_b
13779: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
13780: );
13781: ELSE
13782:

Line 13784: INTO zx_rates_b_tmp

13780: );
13781: ELSE
13782:
13783: INSERT ALL
13784: INTO zx_rates_b_tmp
13785: (
13786: TAX_RATE_CODE ,
13787: EFFECTIVE_FROM ,
13788: EFFECTIVE_TO ,

Line 14102: AND not exists (select 1 from zx_rates_b

14098:
14099: --Added following conditions for Sync process
14100: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
14101: --BugFix 3605729 added nvl(source_id, in the following condition.
14102: AND not exists (select 1 from zx_rates_b
14103: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
14104: )
14105: UNION ALL
14106: SELECT

Line 14204: AND not exists (select 1 from zx_rates_b

14200:
14201: --Added following conditions for Sync process
14202: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
14203: --BugFix 3605729 added nvl(source_id, in the following condition.
14204: AND not exists (select 1 from zx_rates_b
14205: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
14206: );
14207:
14208: END IF;

Line 14245: ZX_RATES_B RATES,

14241: L.LANGUAGE_CODE,
14242: userenv('LANG'),
14243: avtb.description
14244: FROM FND_LANGUAGES L,
14245: ZX_RATES_B RATES,
14246: ap_tax_codes_all avtb --snoothi changed table name from 'ar_vat_tax_all_b' to 'ap_tax_codes_all' bug#10221534
14247: WHERE
14248: L.INSTALLED_FLAG in ('I', 'B')
14249: AND avtb.tax_id = RATES.tax_rate_id

Line 14301: update zx_rates_b_tmp rates

14297: /*Stamp the default rate flag correctly for non recovery based rates
14298: Atleast one rate should have this flag set to 'Y' for a given combination
14299: of regime,tax, status and content owner */
14300:
14301: update zx_rates_b_tmp rates
14302: set rates.default_rate_flag = 'Y' ,
14303: rates.default_flg_effective_from = rates.effective_from, --Bug 5104891
14304: rates.default_flg_effective_to = rates.effective_to -- Bug 6680676
14305: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1

Line 14305: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1

14301: update zx_rates_b_tmp rates
14302: set rates.default_rate_flag = 'Y' ,
14303: rates.default_flg_effective_from = rates.effective_from, --Bug 5104891
14304: rates.default_flg_effective_to = rates.effective_to -- Bug 6680676
14305: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
14306: where rates.tax_regime_code = rates1.tax_regime_code
14307: and rates.tax = rates1.tax
14308: and rates.tax_status_code = rates1.tax_status_code
14309: and rates.content_owner_id = rates1.content_owner_id

Line 14317: and not exists (select 1 from zx_rates_b rates2

14313: and nvl(rates1.effective_to,sysdate)
14314: and rownum = 1)
14315: /* Not Exists is to prevent the default_rate_flag to be updated to 'Y' for 2 rates under the same combination of
14316: regime,tax,status and Content owner */
14317: and not exists (select 1 from zx_rates_b rates2
14318: where rates2.tax_regime_code = rates.tax_regime_code
14319: and rates2.tax = rates.tax
14320: and rates2.tax_status_code = rates.tax_status_code
14321: and rates2.content_owner_id = rates.content_owner_id

Line 14331: /* update zx_rates_b_tmp rates

14327: of regime ,tax, status and content owner */
14328:
14329: --Commenting out the logic as it is no longer required
14330: --Bug 5209434
14331: /* update zx_rates_b_tmp rates
14332: set rates.default_rate_flag = 'Y' ,
14333: rates.default_flg_effective_from = rates.effective_from --Bug 5104891
14334: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
14335: where rates.tax_regime_code = rates1.tax_regime_code

Line 14334: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1

14330: --Bug 5209434
14331: /* update zx_rates_b_tmp rates
14332: set rates.default_rate_flag = 'Y' ,
14333: rates.default_flg_effective_from = rates.effective_from --Bug 5104891
14334: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
14335: where rates.tax_regime_code = rates1.tax_regime_code
14336: and rates.tax = rates1.tax
14337: and rates.tax_status_code = rates1.tax_status_code
14338: and rates.content_owner_id = rates1.content_owner_id

Line 14345: and not exists (select 1 from zx_rates_b rates2

14341: and sysdate between rates1.effective_from
14342: and nvl(rates1.effective_to,sysdate)
14343: and rownum = 1)
14344:
14345: and not exists (select 1 from zx_rates_b rates2
14346: where rates2.tax_regime_code = rates.tax_regime_code
14347: and rates2.tax = rates.tax
14348: and rates2.tax_status_code = rates.tax_status_code
14349: and rates2.content_owner_id = rates.content_owner_id