DBA Data[Home] [Help]

APPS.ZX_MIGRATE_TAX_DEF dependencies on ZX_RATES_B

Line 955: | ZX_RATES_B |

951: | |
952: | DESCRIPTION |
953: | This routine processes AP normal Tax codes and inserts appropriate |
954: | data into the following zx base tables. |
955: | ZX_RATES_B |
956: | ZX_RATES_TL |
957: | ZX_ACCOUNTS |
958: | |
959: | SCOPE - PUBLIC |

Line 990: INTO zx_rates_b_tmp

986: IF ID_CLASH = 'Y' THEN
987: IF L_MULTI_ORG_FLAG = 'Y' THEN
988:
989: INSERT ALL
990: INTO zx_rates_b_tmp
991: (
992: TAX_RATE_CODE ,
993: EFFECTIVE_FROM ,
994: EFFECTIVE_TO ,

Line 1102: zx_rates_b_s.nextval ,--TAX_RATE_ID

1098: ATTRIBUTE13 ,
1099: ATTRIBUTE14 ,
1100: ATTRIBUTE15 ,
1101: ATTRIBUTE_CATEGORY ,
1102: zx_rates_b_s.nextval ,--TAX_RATE_ID
1103: CONTENT_OWNER_ID ,
1104: fnd_global.user_id ,
1105: SYSDATE ,
1106: fnd_global.user_id ,

Line 1168: zx_rates_b_s.nextval ,--TAX_RATE_ID

1164: )
1165: VALUES
1166: (
1167: ZX_ACCOUNTS_S.nextval ,
1168: zx_rates_b_s.nextval ,--TAX_RATE_ID
1169: 'RATES' ,
1170: LEDGER_ID ,
1171: ORG_ID ,
1172: TAX_ACCOUNT_CCID ,

Line 1305: AND not exists (select 1 from zx_rates_b

1301: AND codes.org_id = ptp.party_id
1302: AND ptp.party_Type_code = 'OU'
1303: --Added following conditions for Sync process
1304: --AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1305: AND not exists (select 1 from zx_rates_b
1306: where source_id = nvl(p_tax_id,codes.tax_id)
1307: )
1308: UNION ALL
1309:

Line 1406: AND not exists (select 1 from zx_rates_b

1402: AND codes.org_id = ptp.party_id
1403: AND ptp.party_Type_code = 'OU'
1404: --Added following conditions for Sync process
1405: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1406: AND not exists (select 1 from zx_rates_b
1407: where source_id = nvl(p_tax_id,codes.tax_id)
1408: ) ;
1409: ELSE
1410: INSERT ALL

Line 1411: INTO zx_rates_b_tmp

1407: where source_id = nvl(p_tax_id,codes.tax_id)
1408: ) ;
1409: ELSE
1410: INSERT ALL
1411: INTO zx_rates_b_tmp
1412: (
1413: TAX_RATE_CODE ,
1414: EFFECTIVE_FROM ,
1415: EFFECTIVE_TO ,

Line 1523: zx_rates_b_s.nextval ,--TAX_RATE_ID

1519: ATTRIBUTE13 ,
1520: ATTRIBUTE14 ,
1521: ATTRIBUTE15 ,
1522: ATTRIBUTE_CATEGORY ,
1523: zx_rates_b_s.nextval ,--TAX_RATE_ID
1524: CONTENT_OWNER_ID ,
1525: fnd_global.user_id ,
1526: SYSDATE ,
1527: fnd_global.user_id ,

Line 1589: zx_rates_b_s.nextval ,--TAX_RATE_ID

1585: )
1586: VALUES
1587: (
1588: ZX_ACCOUNTS_S.nextval ,
1589: zx_rates_b_s.nextval ,--TAX_RATE_ID
1590: 'RATES' ,
1591: LEDGER_ID ,
1592: ORG_ID ,
1593: TAX_ACCOUNT_CCID ,

Line 1727: AND not exists (select 1 from zx_rates_b

1723: AND codes.org_id =ptp.party_id
1724: AND ptp.party_Type_code = 'OU'
1725: --Added following conditions for Sync process
1726: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1727: AND not exists (select 1 from zx_rates_b
1728: where source_id = nvl(p_tax_id,codes.tax_id)
1729: )
1730: UNION ALL
1731:

Line 1829: AND not exists (select 1 from zx_rates_b

1825: AND codes.org_id = ptp.party_id
1826: AND ptp.party_Type_code = 'OU'
1827: --Added following conditions for Sync process
1828: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
1829: AND not exists (select 1 from zx_rates_b
1830: where source_id = nvl(p_tax_id,codes.tax_id)
1831: ) ;
1832:
1833:

Line 1840: INTO zx_rates_b_tmp

1836:
1837: if l_multi_org_flag = 'Y'
1838: then
1839: INSERT ALL
1840: INTO zx_rates_b_tmp
1841: (
1842: TAX_RATE_CODE ,
1843: EFFECTIVE_FROM ,
1844: EFFECTIVE_TO ,

Line 2157: AND not exists (select 1 from zx_rates_b

2153:
2154: --Added following conditions for Sync process
2155: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2156: --BugFix 3605729 added nvl(source_id, in the following condition.
2157: AND not exists (select 1 from zx_rates_b
2158: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2159: )
2160: UNION ALL
2161:

Line 2259: AND not exists (select 1 from zx_rates_b

2255:
2256: --Added following conditions for Sync process
2257: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2258: --BugFix 3605729 added nvl(source_id, in the following condition.
2259: AND not exists (select 1 from zx_rates_b
2260: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2261: );
2262: else
2263:

Line 2265: INTO zx_rates_b_tmp

2261: );
2262: else
2263:
2264: INSERT ALL
2265: INTO zx_rates_b_tmp
2266: (
2267: TAX_RATE_CODE ,
2268: EFFECTIVE_FROM ,
2269: EFFECTIVE_TO ,

Line 2583: AND not exists (select 1 from zx_rates_b

2579:
2580: --Added following conditions for Sync process
2581: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2582: --BugFix 3605729 added nvl(source_id, in the following condition.
2583: AND not exists (select 1 from zx_rates_b
2584: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2585: )
2586: UNION ALL
2587:

Line 2686: AND not exists (select 1 from zx_rates_b

2682:
2683: --Added following conditions for Sync process
2684: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
2685: --BugFix 3605729 added nvl(source_id, in the following condition.
2686: AND not exists (select 1 from zx_rates_b
2687: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
2688: );
2689:
2690:

Line 2723: ZX_RATES_B RATES,

2719: L.LANGUAGE_CODE,
2720: userenv('LANG'),
2721: avtb.description
2722: FROM FND_LANGUAGES L,
2723: ZX_RATES_B RATES,
2724: ar_vat_tax_all_b avtb
2725: WHERE
2726: L.INSTALLED_FLAG in ('I', 'B')
2727: AND avtb.vat_tax_id = RATES.tax_rate_id

Line 2761: | ZX_RATES_B |

2757: | |
2758: | DESCRIPTION |
2759: | This routine processes assigned OFFSET Tax codes and inserts |
2760: | appropriate data into the following zx base tables. |
2761: | ZX_RATES_B |
2762: | ZX_RATES_TL |
2763: | ZX_ACCOUNTS |
2764: | |
2765: | SCOPE - PUBLIC |

Line 2794: INTO zx_rates_b_tmp

2790: --BugFix 3605729
2791: IF ID_CLASH = 'Y' THEN
2792: IF L_MULTI_ORG_FLAG = 'Y' THEN
2793: INSERT ALL
2794: INTO zx_rates_b_tmp
2795: (
2796: TAX_RATE_CODE ,
2797: EFFECTIVE_FROM ,
2798: EFFECTIVE_TO ,

Line 2906: zx_rates_b_s.nextval ,--TAX_RATE_ID

2902: ATTRIBUTE13 ,
2903: ATTRIBUTE14 ,
2904: ATTRIBUTE15 ,
2905: ATTRIBUTE_CATEGORY ,
2906: zx_rates_b_s.nextval ,--TAX_RATE_ID
2907: CONTENT_OWNER_ID ,
2908: fnd_global.user_id ,
2909: SYSDATE ,
2910: fnd_global.user_id ,

Line 2972: zx_rates_b_s.nextval ,--TAX_RATE_ID

2968: )
2969: VALUES
2970: (
2971: ZX_ACCOUNTS_S.NEXTVAL,
2972: zx_rates_b_s.nextval ,--TAX_RATE_ID
2973: 'RATES' ,
2974: LEDGER_ID ,
2975: ORG_ID ,
2976: TAX_ACCOUNT_CCID ,

Line 3100: AND not exists (select 1 from zx_rates_b

3096:
3097: --Added following conditions for Sync process
3098: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3099: --Added following conditions for Re-runnability check
3100: AND not exists (select 1 from zx_rates_b
3101: where source_id = nvl(p_tax_id,offset.tax_id)
3102: ) ;
3103: ELSE
3104: INSERT ALL

Line 3105: INTO zx_rates_b_tmp

3101: where source_id = nvl(p_tax_id,offset.tax_id)
3102: ) ;
3103: ELSE
3104: INSERT ALL
3105: INTO zx_rates_b_tmp
3106: (
3107: TAX_RATE_CODE ,
3108: EFFECTIVE_FROM ,
3109: EFFECTIVE_TO ,

Line 3217: zx_rates_b_s.nextval ,--TAX_RATE_ID

3213: ATTRIBUTE13 ,
3214: ATTRIBUTE14 ,
3215: ATTRIBUTE15 ,
3216: ATTRIBUTE_CATEGORY ,
3217: zx_rates_b_s.nextval ,--TAX_RATE_ID
3218: CONTENT_OWNER_ID ,
3219: fnd_global.user_id ,
3220: SYSDATE ,
3221: fnd_global.user_id ,

Line 3283: zx_rates_b_s.nextval ,--TAX_RATE_ID

3279: )
3280: VALUES
3281: (
3282: ZX_ACCOUNTS_S.NEXTVAL ,
3283: zx_rates_b_s.nextval ,--TAX_RATE_ID
3284: 'RATES' ,
3285: LEDGER_ID ,
3286: ORG_ID ,
3287: TAX_ACCOUNT_CCID ,

Line 3412: AND not exists (select 1 from zx_rates_b

3408:
3409: --Added following conditions for Sync process
3410: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3411: --Added following conditions for Re-runnability check
3412: AND not exists (select 1 from zx_rates_b
3413: where source_id = nvl(p_tax_id,offset.tax_id)
3414: ) ;
3415:
3416: END IF;

Line 3423: INTO zx_rates_b_tmp

3419: IF L_MULTI_ORG_FLAG = 'Y'
3420: THEN
3421:
3422: INSERT ALL
3423: INTO zx_rates_b_tmp
3424: (
3425: TAX_RATE_CODE ,
3426: EFFECTIVE_FROM ,
3427: EFFECTIVE_TO ,

Line 3728: AND not exists (select 1 from zx_rates_b

3724:
3725: --Added following conditions for Sync process
3726: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
3727: --BugFix 3605729 added nvl(source_id, in the following condition.
3728: AND not exists (select 1 from zx_rates_b
3729: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
3730: )
3731: ;
3732: ELSE

Line 3734: INTO zx_rates_b_tmp

3730: )
3731: ;
3732: ELSE
3733: INSERT ALL
3734: INTO zx_rates_b_tmp
3735: (
3736: TAX_RATE_CODE ,
3737: EFFECTIVE_FROM ,
3738: EFFECTIVE_TO ,

Line 4040: AND not exists (select 1 from zx_rates_b

4036:
4037: --Added following conditions for Sync process
4038: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4039: --BugFix 3605729 added nvl(source_id, in the following condition.
4040: AND not exists (select 1 from zx_rates_b
4041: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
4042: )
4043: ;
4044:

Line 4077: ZX_RATES_B RATES,

4073: L.LANGUAGE_CODE,
4074: userenv('LANG'),
4075: avtb.description
4076: FROM FND_LANGUAGES L,
4077: ZX_RATES_B RATES,
4078: ar_vat_tax_all_b avtb
4079: WHERE
4080: L.INSTALLED_FLAG in ('I', 'B')
4081: AND avtb.vat_tax_id = RATES.tax_rate_id

Line 4112: | ZX_RATES_B |

4108: | |
4109: | DESCRIPTION |
4110: | This routine processes unassigned OFFSET Tax codes and inserts |
4111: | appropriate data into the following zx base tables. |
4112: | ZX_RATES_B |
4113: | ZX_RATES_TL |
4114: | ZX_ACCOUNTS |
4115: | |
4116: | SCOPE - PUBLIC |

Line 4144: INTO zx_rates_b_tmp

4140: --BugFix 3605729
4141: IF ID_CLASH = 'Y' THEN
4142: IF L_MULTI_ORG_FLAG = 'Y' THEN
4143: INSERT ALL
4144: INTO zx_rates_b_tmp
4145: (
4146: TAX_RATE_CODE ,
4147: EFFECTIVE_FROM ,
4148: EFFECTIVE_TO ,

Line 4256: zx_rates_b_s.nextval ,--TAX_RATE_ID

4252: ATTRIBUTE13 ,
4253: ATTRIBUTE14 ,
4254: ATTRIBUTE15 ,
4255: ATTRIBUTE_CATEGORY ,
4256: zx_rates_b_s.nextval ,--TAX_RATE_ID
4257: CONTENT_OWNER_ID ,
4258: fnd_global.user_id ,
4259: SYSDATE ,
4260: fnd_global.user_id ,

Line 4322: zx_rates_b_s.nextval ,--TAX_RATE_ID

4318: )
4319: VALUES
4320: (
4321: ZX_ACCOUNTS_S.NEXTVAL ,
4322: zx_rates_b_s.nextval ,--TAX_RATE_ID
4323: 'RATES' ,
4324: LEDGER_ID ,
4325: ORG_ID ,
4326: TAX_ACCOUNT_CCID ,

Line 4447: AND not exists (select 1 from zx_rates_b

4443: offset_tax_code_id = offset.tax_id)
4444: --Added following conditions for Sync process
4445: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4446: --Rerunnability check
4447: AND not exists (select 1 from zx_rates_b
4448: where source_id = nvl(p_tax_id,offset.tax_id)
4449: ) ;
4450: ELSE
4451:

Line 4453: INTO zx_rates_b_tmp

4449: ) ;
4450: ELSE
4451:
4452: INSERT ALL
4453: INTO zx_rates_b_tmp
4454: (
4455: TAX_RATE_CODE ,
4456: EFFECTIVE_FROM ,
4457: EFFECTIVE_TO ,

Line 4565: zx_rates_b_s.nextval ,--TAX_RATE_ID

4561: ATTRIBUTE13 ,
4562: ATTRIBUTE14 ,
4563: ATTRIBUTE15 ,
4564: ATTRIBUTE_CATEGORY ,
4565: zx_rates_b_s.nextval ,--TAX_RATE_ID
4566: CONTENT_OWNER_ID ,
4567: fnd_global.user_id ,
4568: SYSDATE ,
4569: fnd_global.user_id ,

Line 4631: zx_rates_b_s.nextval ,--TAX_RATE_ID

4627: )
4628: VALUES
4629: (
4630: ZX_ACCOUNTS_S.NEXTVAL ,
4631: zx_rates_b_s.nextval ,--TAX_RATE_ID
4632: 'RATES' ,
4633: LEDGER_ID ,
4634: ORG_ID ,
4635: TAX_ACCOUNT_CCID ,

Line 4757: AND not exists (select 1 from zx_rates_b

4753: offset_tax_code_id = offset.tax_id)
4754: --Added following conditions for Sync process
4755: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
4756: --Rerunnability check
4757: AND not exists (select 1 from zx_rates_b
4758: where source_id = nvl(p_tax_id,offset.tax_id)
4759: ) ;
4760:
4761: END IF;

Line 4767: INTO zx_rates_b_tmp

4763:
4764: IF L_MULTI_ORG_FLAG = 'Y'
4765: THEN
4766: INSERT ALL
4767: INTO zx_rates_b_tmp
4768: (
4769: TAX_RATE_CODE ,
4770: EFFECTIVE_FROM ,
4771: EFFECTIVE_TO ,

Line 5071: AND not exists (select 1 from zx_rates_b

5067: offset_tax_code_id = offset.tax_id)
5068: --Added following conditions for Sync process
5069: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
5070: --BugFix 3605729 added nvl(source_id, in the following condition.
5071: AND not exists (select 1 from zx_rates_b
5072: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
5073: )
5074: ;
5075: ELSE

Line 5078: INTO zx_rates_b_tmp

5074: ;
5075: ELSE
5076:
5077: INSERT ALL
5078: INTO zx_rates_b_tmp
5079: (
5080: TAX_RATE_CODE ,
5081: EFFECTIVE_FROM ,
5082: EFFECTIVE_TO ,

Line 5383: AND not exists (select 1 from zx_rates_b

5379: offset_tax_code_id = offset.tax_id)
5380: --Added following conditions for Sync process
5381: AND offset.tax_id = nvl(p_tax_id,offset.tax_id)
5382: --BugFix 3605729 added nvl(source_id, in the following condition.
5383: AND not exists (select 1 from zx_rates_b
5384: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,offset.tax_id)
5385: )
5386: ;
5387: END IF;

Line 5418: ZX_RATES_B RATES,

5414: L.LANGUAGE_CODE,
5415: userenv('LANG'),
5416: avtb.description
5417: FROM FND_LANGUAGES L,
5418: ZX_RATES_B RATES,
5419: ar_vat_tax_all_b avtb
5420: WHERE
5421: L.INSTALLED_FLAG in ('I', 'B')
5422: AND avtb.vat_tax_id = RATES.tax_rate_id

Line 5452: | ZX_RATES_B |

5448: | |
5449: | DESCRIPTION |
5450: | This routine processes distinct recovery rates,inserts appropriate |
5451: | data into the following zx base tables. |
5452: | ZX_RATES_B |
5453: | ZX_RATES_TL |
5454: | ZX_ACCOUNTS |
5455: | |
5456: | SCOPE - PUBLIC |

Line 5494: ZX_RATES_B

5490: 0,DEFAULT_REC_RATE_CODE,
5491: substrb(DEFAULT_REC_RATE_CODE,1,instrb(DEFAULT_REC_RATE_CODE,'-',1,2)-1)) DEFAULT_REC_RATE_CODE
5492:
5493: FROM
5494: ZX_RATES_B
5495: where record_type_code = 'MIGRATED'
5496: and DEFAULT_REC_RATE_CODE is not null
5497: GROUP BY
5498: TAX_REGIME_CODE,

Line 5508: INSERT INTO zx_rates_b_tmp

5504:
5505: )
5506: LOOP
5507: BEGIN
5508: INSERT INTO zx_rates_b_tmp
5509: (
5510: TAX_RATE_CODE ,
5511: EFFECTIVE_FROM ,
5512: EFFECTIVE_TO ,

Line 5581: ZX_RATES_B_S.NEXTVAL ,

5577: RECOVERY_RULE_CODE ,
5578: DEF_REC_SETTLEMENT_OPTION_CODE ,
5579: RECORD_TYPE_CODE ,
5580: 'INPUT' ,
5581: ZX_RATES_B_S.NEXTVAL ,
5582: CONTENT_OWNER_ID ,
5583: fnd_global.user_id ,
5584: SYSDATE ,
5585: fnd_global.user_id ,

Line 5601: from zx_rates_b

5597: SELECT
5598: SUBSTRB(rates.default_rec_rate_code,1,24) TAX_RATE_CODE, --Bug 4943105
5599: rates.CONTENT_OWNER_ID,
5600: (select min(effective_from)
5601: from zx_rates_b
5602: where record_type_code = 'MIGRATED'
5603: and default_rec_rate_code =
5604: rates.default_rec_rate_code
5605: and tax_regime_code =

Line 5640: zx_rates_b rates

5636: NULL DEF_REC_SETTLEMENT_OPTION_CODE,
5637: 'MIGRATED' RECORD_TYPE_CODE
5638: FROM
5639: ap_tax_codes_all codes,
5640: zx_rates_b rates
5641: WHERE
5642: --BugFix 3480468
5643: rates.default_rec_rate_code is not null
5644: AND rates.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE

Line 5654: AND not exists (select 1 from zx_rates_b_tmp

5650: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
5651: AND codes.tax_id = nvl(rates.source_id, rates.tax_rate_id)
5652: AND rates.record_type_code = 'MIGRATED'
5653: AND ROWNUM = 1
5654: AND not exists (select 1 from zx_rates_b_tmp
5655: where SUBSTRB(tax_rate_code,1,24) = substrb(rates.default_rec_rate_code,1,24) --Bug 4943105
5656: and content_owner_id = rates.content_owner_id
5657: and tax_jurisdiction_code = (SELECT tax_id FROM zx_taxes_b WHERE tax_regime_code = rates.tax_regime_code AND tax = rates.tax AND content_owner_id = rates.content_owner_id)
5658: )

Line 5664: update zx_rates_b rates

5660:
5661:
5662: -- Bug 4677185 : Logic to backupdate the Recovery_Tax_Rate_Code created on to the orginal tax rate.
5663: /* Commented for the Bug 4943105 :
5664: update zx_rates_b rates
5665: set rates.DEFAULT_REC_RATE_CODE = ( select rates2.tax_rate_code
5666: from zx_rates_b rates2
5667: where rates2.CONTENT_OWNER_ID = cursor_rec.CONTENT_OWNER_ID
5668: AND rates2.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE

Line 5666: from zx_rates_b rates2

5662: -- Bug 4677185 : Logic to backupdate the Recovery_Tax_Rate_Code created on to the orginal tax rate.
5663: /* Commented for the Bug 4943105 :
5664: update zx_rates_b rates
5665: set rates.DEFAULT_REC_RATE_CODE = ( select rates2.tax_rate_code
5666: from zx_rates_b rates2
5667: where rates2.CONTENT_OWNER_ID = cursor_rec.CONTENT_OWNER_ID
5668: AND rates2.TAX_REGIME_CODE = cursor_rec.TAX_REGIME_CODE
5669: AND rates2.TAX = cursor_rec.TAX
5670: AND rates2.TAX_STATUS_CODE = cursor_rec.TAX_STATUS_CODE

Line 5721: ZX_RATES_B RATES,

5717: L.LANGUAGE_CODE,
5718: userenv('LANG'),
5719: avtb.description
5720: FROM FND_LANGUAGES L,
5721: ZX_RATES_B RATES,
5722: ar_vat_tax_all_b avtb
5723: WHERE
5724: L.INSTALLED_FLAG in ('I', 'B')
5725: AND avtb.vat_tax_id = RATES.tax_rate_id

Line 5757: | ZX_RATES_B |

5753: | |
5754: | DESCRIPTION |
5755: | This routine processes distinct recovery rates,inserts appropriate |
5756: | data into the following zx base tables. |
5757: | ZX_RATES_B |
5758: | ZX_RATES_TL |
5759: | ZX_ACCOUNTS |
5760: | |
5761: | SCOPE - PUBLIC |

Line 5786: INSERT INTO zx_rates_b_tmp

5782:
5783: --For Tax Recovery Rules associated Recovery Rates.
5784: BEGIN
5785:
5786: INSERT INTO zx_rates_b_tmp
5787: (
5788: TAX_RATE_CODE ,
5789: EFFECTIVE_FROM ,
5790: EFFECTIVE_TO ,

Line 5859: ZX_RATES_B_S.NEXTVAL ,

5855: RECOVERY_RULE_CODE ,
5856: DEF_REC_SETTLEMENT_OPTION_CODE ,
5857: RECORD_TYPE_CODE ,
5858: 'INPUT' ,
5859: ZX_RATES_B_S.NEXTVAL ,
5860: CONTENT_OWNER_ID ,
5861: fnd_global.user_id ,
5862: SYSDATE ,
5863: fnd_global.user_id ,

Line 5910: zx_rates_b zx_rates,

5906: NULL DEF_REC_SETTLEMENT_OPTION_CODE,
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

Line 5920: AND not exists (select 1 from zx_rates_b

5916: --Added following conditions for Sync process
5917:
5918: AND codes.tax_id = nvl(zx_rates.source_id, zx_rates.tax_rate_id)
5919: AND zx_rates.record_type_code = 'MIGRATED'
5920: AND not exists (select 1 from zx_rates_b
5921: where decode(instrb(tax_rate_code,'-',1,2),
5922: 0,tax_rate_code,
5923: substrb(tax_rate_code,1,instrb(tax_rate_code,'-',1,2)-1)) = 'STANDARD-'|| rates.recovery_rate -- Bug 4644762
5924: and rate_type_code = 'RECOVERY'

Line 5956: | ZX_RATES_B |

5952: | DESCRIPTION |
5953: | This routine creates an adhoc recovery rate with tax_rate_code |
5954: | starting with AD_HOC_RECOVERY for each tax for which tax recovery |
5955: | is allowed and populates the following ZX base tables. |
5956: | ZX_RATES_B |
5957: | ZX_RATES_TL |
5958: | SCOPE - PRIVATE |
5959: | |
5960: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 5980: INSERT INTO zx_rates_b_tmp

5976: END IF;
5977:
5978: -- For adhoc Recovery Rate creation.
5979: BEGIN
5980: INSERT INTO zx_rates_b_tmp
5981: (
5982: TAX_RATE_CODE ,
5983: EFFECTIVE_FROM ,
5984: EFFECTIVE_TO ,

Line 6050: ZX_RATES_B_S.NEXTVAL ,

6046: RECOVERY_RULE_CODE ,
6047: DEF_REC_SETTLEMENT_OPTION_CODE ,
6048: RECORD_TYPE_CODE ,
6049: 'INPUT' ,
6050: ZX_RATES_B_S.NEXTVAL ,
6051: CONTENT_OWNER_ID ,
6052: fnd_global.user_id ,
6053: SYSDATE ,
6054: fnd_global.user_id ,

Line 6098: AND not exists (select 1 from zx_rates_b

6094: zx_taxes_b taxes
6095: WHERE taxes.ALLOW_RECOVERABILITY_FLAG = 'Y'
6096: AND taxes.RECORD_TYPE_CODE = 'MIGRATED'
6097: -- Re-runnability Check
6098: AND not exists (select 1 from zx_rates_b
6099: WHERE TAX_RATE_CODE = 'AD_HOC_RECOVERY'
6100: AND CONTENT_OWNER_ID = taxes.content_owner_id
6101: AND tax_regime_code = taxes.tax_regime_code
6102: AND TAX = taxes.tax

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

6104: ) );
6105: EXCEPTION
6106: WHEN OTHERS THEN
6107: IF PG_DEBUG = 'Y' THEN
6108: arp_util_tax.debug('EXCEPTION: Create_Adhoc_Recovery_Rates-insert into ZX_RATES_B ');
6109: arp_util_tax.debug(sqlerrm);
6110: END IF;
6111: END;
6112:

Line 6142: ZX_RATES_B RATES

6138: fnd_global.conc_login_id ,
6139: L.LANGUAGE_CODE,
6140: userenv('LANG')
6141: FROM FND_LANGUAGES L,
6142: ZX_RATES_B RATES
6143: WHERE
6144: L.INSTALLED_FLAG in ('I', 'B')
6145: AND RATES.RECORD_TYPE_CODE = 'MIGRATED'
6146: AND not exists

Line 6172: | above inserted data into ZX_RATES_B. |

6168: | create_zx_statuses |
6169: | |
6170: | DESCRIPTION |
6171: | This routine inserts data into ZX_STATUS_B,_TL based on the |
6172: | above inserted data into ZX_RATES_B. |
6173: | |
6174: | SCOPE - PUBLIC |
6175: | |
6176: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 6294: FROM ZX_RATES_B rates

6290: CONTENT_OWNER_ID,
6291: TAX,
6292: TAX_STATUS_CODE,
6293: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6294: FROM ZX_RATES_B rates
6295: WHERE
6296: rates.record_type_code = 'MIGRATED'
6297: AND rates.tax_status_code IS NOT NULL
6298: --Added following conditions for Sync process

Line 6431: ZX_RATES_B rates,

6427: CONTENT_OWNER_ID,
6428: TAX,
6429: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6430: FROM
6431: ZX_RATES_B rates,
6432: ap_tax_codes_all codes,
6433: zx_party_tax_profile ptp
6434: WHERE
6435: rates.record_type_code = 'MIGRATED' AND

Line 6564: ZX_RATES_B rates,

6560: CONTENT_OWNER_ID,
6561: TAX,
6562: min(EFFECTIVE_FROM) EFFECTIVE_FROM
6563: FROM
6564: ZX_RATES_B rates,
6565: ap_tax_codes_all codes,
6566: zx_party_tax_profile ptp
6567: WHERE
6568: rates.record_type_code = 'MIGRATED' AND

Line 6639: ZX_RATES_B rates

6635: FND_LANGUAGES L,
6636: ZX_STATUS_B Status,
6637: JA_LOOKUPS lookups,
6638: ap_tax_codes_all codes,
6639: ZX_RATES_B rates
6640: WHERE
6641: L.INSTALLED_FLAG in ('I', 'B')
6642: AND Status.RECORD_TYPE_CODE = 'MIGRATED'
6643: AND codes.tax_id = nvl(rates.source_id, rates.tax_rate_id)

Line 6733: | above inserted data into ZX_RATES_B. |

6729: | create_zx_taxes |
6730: | |
6731: | DESCRIPTION |
6732: | This routine inserts data into ZX_TAXES_B,_TL based on the |
6733: | above inserted data into ZX_RATES_B. |
6734: | |
6735: | SCOPE - PUBLIC |
6736: | |
6737: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 6890: from zx_rates_b rates, ap_tax_codes_all codes

6886: codes.tax_type tax_type_code,
6887: rates.tax_regime_code tax_regime_code,
6888: rates.tax tax,
6889: rates.content_owner_id content_owner_id
6890: from zx_rates_b rates, ap_tax_codes_all codes
6891: where codes.tax_id = rates.source_id --ID Clash
6892: AND rates.tax_class = 'INPUT'
6893: AND rates.record_type_code = 'MIGRATED'
6894: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 6954: EXISTS (select 1 from zx_rates_b active_rate

6950: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
6951: 'N' ,--REPORTING_ONLY_FLAG
6952: 'N' ,--AUTO_PRVN_FLAG
6953: CASE WHEN
6954: EXISTS (select 1 from zx_rates_b active_rate
6955: where active_rate.TAX = l_TAX
6956: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
6957: and sysdate between active_rate.effective_from
6958: and nvl(active_rate.effective_to,sysdate))

Line 6988: from zx_rates_b

6984: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
6985: --BugFix 3493419
6986: DECODE(l_CONTENT_OWNER_ID,
6987: (select min(CONTENT_OWNER_ID)
6988: from zx_rates_b
6989: where tax = l_TAX
6990: and tax_regime_code = l_TAX_REGIME_CODE
6991: and RECORD_TYPE_CODE = 'MIGRATED'),
6992: 'Y',

Line 7042: from zx_rates_b rates, ap_tax_codes_all codes

7038: codes.tax_type tax_type_code,
7039: rates.tax_regime_code tax_regime_code,
7040: rates.tax tax,
7041: rates.content_owner_id content_owner_id
7042: from zx_rates_b rates, ap_tax_codes_all codes
7043: where codes.tax_id = rates.source_id --ID Clash
7044: AND rates.tax_class = 'INPUT'
7045: AND rates.record_type_code = 'MIGRATED'
7046: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7100: ZX_RATES_B RATES,

7096: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7097: -- DECODE(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7098: NULL DEFAULT_EXCHANGE_RATE_TYPE
7099: FROM
7100: ZX_RATES_B RATES,
7101: AP_TAX_CODES_ALL CODES,
7102: GL_SETS_OF_BOOKS SOB,
7103: AP_SYSTEM_PARAMETERS_ALL ASP,
7104: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 7286: from zx_rates_b rates, ap_tax_codes_all codes

7282: codes.tax_type tax_type_code,
7283: rates.tax_regime_code tax_regime_code,
7284: rates.tax tax,
7285: rates.content_owner_id content_owner_id
7286: from zx_rates_b rates, ap_tax_codes_all codes
7287: where codes.tax_id = rates.source_id --ID Clash
7288: AND rates.tax_class = 'INPUT'
7289: AND rates.record_type_code = 'MIGRATED'
7290: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7350: EXISTS (select 1 from zx_rates_b active_rate

7346: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
7347: 'N' ,--REPORTING_ONLY_FLAG
7348: 'N' ,--AUTO_PRVN_FLAG
7349: CASE WHEN
7350: EXISTS (select 1 from zx_rates_b active_rate
7351: where active_rate.TAX = l_TAX
7352: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
7353: and sysdate between active_rate.effective_from
7354: and nvl(active_rate.effective_to,sysdate))

Line 7384: from zx_rates_b

7380: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
7381: --BugFix 3493419
7382: DECODE(l_CONTENT_OWNER_ID,
7383: (select min(CONTENT_OWNER_ID)
7384: from zx_rates_b
7385: where tax = l_TAX
7386: and tax_regime_code = l_TAX_REGIME_CODE
7387: and RECORD_TYPE_CODE = 'MIGRATED'),
7388: 'Y',

Line 7438: from zx_rates_b rates, ap_tax_codes_all codes

7434: codes.tax_type tax_type_code,
7435: rates.tax_regime_code tax_regime_code,
7436: rates.tax tax,
7437: rates.content_owner_id content_owner_id
7438: from zx_rates_b rates, ap_tax_codes_all codes
7439: where codes.tax_id = rates.source_id --ID Clash
7440: AND rates.tax_class = 'INPUT'
7441: AND rates.record_type_code = 'MIGRATED'
7442: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type

Line 7496: ZX_RATES_B RATES,

7492: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7493: -- DECODE(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7494: NULL DEFAULT_EXCHANGE_RATE_TYPE
7495: FROM
7496: ZX_RATES_B RATES,
7497: AP_TAX_CODES_ALL CODES,
7498: GL_SETS_OF_BOOKS SOB,
7499: AP_SYSTEM_PARAMETERS_ALL ASP,
7500: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 7695: from zx_rates_b rates, ap_tax_codes_all codes

7691: (select codes.tax_type tax_type_code,
7692: rates.tax_regime_code tax_regime_code,
7693: rates.tax tax,
7694: rates.content_owner_id content_owner_id
7695: from zx_rates_b rates, ap_tax_codes_all codes
7696: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
7697: group by rates.tax_regime_code, rates.tax, rates.content_owner_id,codes.tax_type
7698: )
7699: where tax_regime_code = l_tax_regime_code

Line 7756: EXISTS (select 1 from zx_rates_b active_rate

7752: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
7753: 'N' ,--REPORTING_ONLY_FLAG
7754: 'N' ,--AUTO_PRVN_FLAG
7755: CASE WHEN
7756: EXISTS (select 1 from zx_rates_b active_rate
7757: where active_rate.TAX = lookups.lookup_code
7758: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
7759: and sysdate between active_rate.effective_from
7760: and nvl(active_rate.effective_to,sysdate))

Line 7789: from zx_rates_b

7785: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
7786: --BugFix 3493419
7787: DECODE(l_CONTENT_OWNER_ID,
7788: (select min(CONTENT_OWNER_ID)
7789: from zx_rates_b
7790: where tax = lookups.lookup_code
7791: and tax_regime_code = l_TAX_REGIME_CODE
7792: and RECORD_TYPE_CODE = 'MIGRATED'),
7793: 'Y',

Line 7843: from zx_rates_b rates, ap_tax_codes_all codes

7839: codes.tax_type tax_type_code,
7840: rates.tax_regime_code tax_regime_code,
7841: rates.tax tax,
7842: rates.content_owner_id content_owner_id
7843: from zx_rates_b rates, ap_tax_codes_all codes
7844: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
7845: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type
7846: )
7847: where tax_regime_code = l_tax_regime_code

Line 7898: ZX_RATES_B RATES,

7894: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
7895: -- decode(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
7896: NULL DEFAULT_EXCHANGE_RATE_TYPE
7897: FROM
7898: ZX_RATES_B RATES,
7899: AP_TAX_CODES_ALL CODES,
7900: GL_SETS_OF_BOOKS SOB,
7901: AP_SYSTEM_PARAMETERS_ALL ASP,
7902: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 8120: from zx_rates_b rates, ap_tax_codes_all codes

8116: (select codes.tax_type tax_type_code,
8117: rates.tax_regime_code tax_regime_code,
8118: rates.tax tax,
8119: rates.content_owner_id content_owner_id
8120: from zx_rates_b rates, ap_tax_codes_all codes
8121: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
8122: group by rates.tax_regime_code, rates.tax, rates.content_owner_id,codes.tax_type
8123: )
8124: where tax_regime_code = l_tax_regime_code

Line 8181: EXISTS (select 1 from zx_rates_b active_rate

8177: 'N' ,--REGISTRATION_TYPE_RULE_FLAG
8178: 'N' ,--REPORTING_ONLY_FLAG
8179: 'N' ,--AUTO_PRVN_FLAG
8180: CASE WHEN
8181: EXISTS (select 1 from zx_rates_b active_rate
8182: where active_rate.TAX = lookups.lookup_code
8183: and active_rate.TAX_REGIME_CODE = l_TAX_REGIME_CODE
8184: and sysdate between active_rate.effective_from
8185: and nvl(active_rate.effective_to,sysdate))

Line 8214: from zx_rates_b

8210: 'N' ,--ALLOW_ROUNDING_OVERRIDE_FLAG
8211: --BugFix 3493419
8212: DECODE(l_CONTENT_OWNER_ID,
8213: (select min(CONTENT_OWNER_ID)
8214: from zx_rates_b
8215: where tax = lookups.lookup_code
8216: and tax_regime_code = l_TAX_REGIME_CODE
8217: and RECORD_TYPE_CODE = 'MIGRATED'),
8218: 'Y',

Line 8268: from zx_rates_b rates, ap_tax_codes_all codes

8264: codes.tax_type tax_type_code,
8265: rates.tax_regime_code tax_regime_code,
8266: rates.tax tax,
8267: rates.content_owner_id content_owner_id
8268: from zx_rates_b rates, ap_tax_codes_all codes
8269: where codes.tax_id = nvl(rates.source_id, rates.tax_rate_id) --ID Clash
8270: group by rates.tax_regime_code, rates.tax, rates.content_owner_id, codes.tax_type
8271: )
8272: where tax_regime_code = l_tax_regime_code

Line 8323: ZX_RATES_B RATES,

8319: -- Bug 6006519/5654551, 'User' is not a valid exchange rate type
8320: -- decode(ASP.DEFAULT_EXCHANGE_RATE_TYPE,'User','Corporate',ASP.DEFAULT_EXCHANGE_RATE_TYPE) DEFAULT_EXCHANGE_RATE_TYPE
8321: NULL DEFAULT_EXCHANGE_RATE_TYPE
8322: FROM
8323: ZX_RATES_B RATES,
8324: AP_TAX_CODES_ALL CODES,
8325: GL_SETS_OF_BOOKS SOB,
8326: AP_SYSTEM_PARAMETERS_ALL ASP,
8327: FINANCIALS_SYSTEM_PARAMS_ALL FSP,

Line 8472: zx_rates_b rates,

8468: fnd_global.conc_login_id ,
8469: taxes.tax_id
8470: FROM
8471: zx_taxes_b taxes,
8472: zx_rates_b rates,
8473: fnd_lookup_values flv,
8474: ap_tax_codes_all ap_code
8475: WHERE
8476: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8522: zx_rates_b rates,

8518: fnd_global.conc_login_id ,
8519: taxes.tax_id
8520: FROM
8521: zx_taxes_b taxes,
8522: zx_rates_b rates,
8523: fnd_lookup_values flv,
8524: ap_tax_codes_all ap_code
8525: WHERE
8526: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8569: zx_rates_b rates,

8565: fnd_global.conc_login_id ,
8566: taxes.tax_id
8567: FROM
8568: zx_taxes_b taxes,
8569: zx_rates_b rates,
8570: fnd_lookup_values flv,
8571: ap_tax_codes_all ap_code
8572: WHERE
8573: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 8616: zx_rates_b rates,

8612: fnd_global.conc_login_id ,
8613: taxes.tax_id
8614: FROM
8615: zx_taxes_b taxes,
8616: zx_rates_b rates,
8617: fnd_lookup_values flv,
8618: ap_tax_codes_all ap_code
8619: WHERE
8620: taxes.CONTENT_OWNER_ID = rates.CONTENT_OWNER_ID

Line 9535: zx_rates_b rates,

9531: where rule_id = RULES.rule_id) EFFECTIVE_FROM,
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)

Line 9651: zx_rates_b rates,

9647: where rule_id = RULES.rule_id) EFFECTIVE_FROM,
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)

Line 9827: ZX_RATES_B ZX_RATES,

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,
9830: zx_party_tax_profile ptp
9831: WHERE

Line 9966: ZX_RATES_B ZX_RATES,

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,
9969: zx_party_tax_profile ptp
9970: WHERE

Line 10057: ZX_RATES_B rates,

10053: ledger_id,
10054: accounts.internal_organization_id
10055: FROM
10056: ZX_ACCOUNTS accounts,
10057: ZX_RATES_B rates,
10058: ZX_TAXES_B taxes
10059: WHERE taxes.tax = rates.tax
10060: and taxes.tax_regime_code = rates.tax_regime_code
10061: and taxes.content_owner_id = rates.content_owner_id

Line 10322: | into zx_rates_b |

10318: | migrate_disabled_tax_codes |
10319: | |
10320: | DESCRIPTION |
10321: | This routine is used to migrate disabled tax codes with overlapping |
10322: | into zx_rates_b |
10323: | |
10324: | SCOPE - PUBLIC |
10325: | |
10326: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 10445: INTO zx_rates_b_tmp

10441: IF L_MULTI_ORG_FLAG = 'Y'
10442: THEN
10443:
10444: INSERT ALL
10445: INTO zx_rates_b_tmp
10446: (
10447: TAX_RATE_CODE ,
10448: EFFECTIVE_FROM ,
10449: EFFECTIVE_TO ,

Line 10557: zx_rates_b_s.nextval ,--TAX_RATE_ID

10553: ATTRIBUTE13 ,
10554: ATTRIBUTE14 ,
10555: ATTRIBUTE15 ,
10556: ATTRIBUTE_CATEGORY ,
10557: zx_rates_b_s.nextval ,--TAX_RATE_ID
10558: CONTENT_OWNER_ID ,
10559: fnd_global.user_id ,
10560: SYSDATE ,
10561: fnd_global.user_id ,

Line 10623: zx_rates_b_s.nextval ,--TAX_RATE_ID

10619: )
10620: VALUES
10621: (
10622: ZX_ACCOUNTS_S.nextval ,
10623: zx_rates_b_s.nextval ,--TAX_RATE_ID
10624: 'RATES' ,
10625: LEDGER_ID ,
10626: ORG_ID ,
10627: TAX_ACCOUNT_CCID ,

Line 10760: AND not exists (select 1 from zx_rates_b

10756: AND codes.org_id = ptp.party_id
10757: AND ptp.party_Type_code = 'OU'
10758: --Added following conditions for Sync process
10759: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
10760: AND not exists (select 1 from zx_rates_b
10761: where source_id = nvl(p_tax_id,codes.tax_id)
10762: )
10763: UNION ALL
10764:

Line 10862: AND not exists (select 1 from zx_rates_b

10858: AND codes.org_id = ptp.party_id
10859: AND ptp.party_Type_code = 'OU'
10860: --Added following conditions for Sync process
10861: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
10862: AND not exists (select 1 from zx_rates_b
10863: where source_id = nvl(p_tax_id,codes.tax_id)
10864: ) ;
10865:
10866: ELSE

Line 10868: INTO zx_rates_b_tmp

10864: ) ;
10865:
10866: ELSE
10867: INSERT ALL
10868: INTO zx_rates_b_tmp
10869: (
10870: TAX_RATE_CODE ,
10871: EFFECTIVE_FROM ,
10872: EFFECTIVE_TO ,

Line 10980: zx_rates_b_s.nextval ,--TAX_RATE_ID

10976: ATTRIBUTE13 ,
10977: ATTRIBUTE14 ,
10978: ATTRIBUTE15 ,
10979: ATTRIBUTE_CATEGORY ,
10980: zx_rates_b_s.nextval ,--TAX_RATE_ID
10981: CONTENT_OWNER_ID ,
10982: fnd_global.user_id ,
10983: SYSDATE ,
10984: fnd_global.user_id ,

Line 11046: zx_rates_b_s.nextval ,--TAX_RATE_ID

11042: )
11043: VALUES
11044: (
11045: ZX_ACCOUNTS_S.nextval ,
11046: zx_rates_b_s.nextval ,--TAX_RATE_ID
11047: 'RATES' ,
11048: LEDGER_ID ,
11049: ORG_ID ,
11050: TAX_ACCOUNT_CCID ,

Line 11184: AND not exists (select 1 from zx_rates_b

11180: AND codes.org_id = ptp.party_id
11181: AND ptp.party_Type_code = 'OU'
11182: --Added following conditions for Sync process
11183: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11184: AND not exists (select 1 from zx_rates_b
11185: where source_id = nvl(p_tax_id,codes.tax_id)
11186: )
11187: UNION ALL
11188:

Line 11287: AND not exists (select 1 from zx_rates_b

11283: AND codes.org_id = ptp.party_id
11284: AND ptp.party_Type_code = 'OU'
11285: --Added following conditions for Sync process
11286: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11287: AND not exists (select 1 from zx_rates_b
11288: where source_id = nvl(p_tax_id,codes.tax_id)
11289: ) ;
11290: END IF;
11291: EXCEPTION WHEN OTHERS THEN

Line 11303: INTO zx_rates_b_tmp

11299: IF L_MULTI_ORG_FLAG = 'Y'
11300: THEN
11301:
11302: INSERT ALL
11303: INTO zx_rates_b_tmp
11304: (
11305: TAX_RATE_CODE ,
11306: EFFECTIVE_FROM ,
11307: EFFECTIVE_TO ,

Line 11620: AND not exists (select 1 from zx_rates_b

11616:
11617: --Added following conditions for Sync process
11618: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11619: --BugFix 3605729 added nvl(source_id, in the following condition.
11620: AND not exists (select 1 from zx_rates_b
11621: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
11622: )
11623: UNION ALL
11624:

Line 11722: AND not exists (select 1 from zx_rates_b

11718:
11719: --Added following conditions for Sync process
11720: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
11721: --BugFix 3605729 added nvl(source_id, in the following condition.
11722: AND not exists (select 1 from zx_rates_b
11723: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
11724: );
11725: ELSE
11726:

Line 11728: INTO zx_rates_b_tmp

11724: );
11725: ELSE
11726:
11727: INSERT ALL
11728: INTO zx_rates_b_tmp
11729: (
11730: TAX_RATE_CODE ,
11731: EFFECTIVE_FROM ,
11732: EFFECTIVE_TO ,

Line 12046: AND not exists (select 1 from zx_rates_b

12042:
12043: --Added following conditions for Sync process
12044: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12045: --BugFix 3605729 added nvl(source_id, in the following condition.
12046: AND not exists (select 1 from zx_rates_b
12047: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
12048: )
12049: UNION ALL
12050:

Line 12149: AND not exists (select 1 from zx_rates_b

12145:
12146: --Added following conditions for Sync process
12147: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12148: --BugFix 3605729 added nvl(source_id, in the following condition.
12149: AND not exists (select 1 from zx_rates_b
12150: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
12151: );
12152:
12153:

Line 12172: INTO zx_rates_b_tmp

12168: IF L_MULTI_ORG_FLAG = 'Y' THEN
12169:
12170: BEGIN
12171: INSERT ALL
12172: INTO zx_rates_b_tmp
12173: (
12174: TAX_RATE_CODE ,
12175: EFFECTIVE_FROM ,
12176: EFFECTIVE_TO ,

Line 12284: zx_rates_b_s.nextval ,--TAX_RATE_ID

12280: ATTRIBUTE13 ,
12281: ATTRIBUTE14 ,
12282: ATTRIBUTE15 ,
12283: ATTRIBUTE_CATEGORY ,
12284: zx_rates_b_s.nextval ,--TAX_RATE_ID
12285: CONTENT_OWNER_ID ,
12286: fnd_global.user_id ,
12287: SYSDATE ,
12288: fnd_global.user_id ,

Line 12350: zx_rates_b_s.nextval ,--TAX_RATE_ID

12346: )
12347: VALUES
12348: (
12349: ZX_ACCOUNTS_S.nextval ,
12350: zx_rates_b_s.nextval ,--TAX_RATE_ID
12351: 'RATES' ,
12352: LEDGER_ID ,
12353: ORG_ID ,
12354: TAX_ACCOUNT_CCID ,

Line 12487: AND not exists (select 1 from zx_rates_b

12483: AND codes.org_id = ptp.party_id
12484: AND ptp.party_Type_code = 'OU'
12485: --Added following conditions for Sync process
12486: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12487: AND not exists (select 1 from zx_rates_b
12488: where source_id = nvl(p_tax_id,codes.tax_id)
12489: )
12490: UNION ALL
12491:

Line 12588: AND not exists (select 1 from zx_rates_b

12584: AND codes.org_id = ptp.party_id
12585: AND ptp.party_Type_code = 'OU'
12586: --Added following conditions for Sync process
12587: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12588: AND not exists (select 1 from zx_rates_b
12589: where source_id = nvl(p_tax_id,codes.tax_id)
12590: ) ;
12591: EXCEPTION WHEN OTHERS THEN
12592: arp_util_tax.debug('Caught an error in the id clash portion for the disabled tax codes

Line 12598: INTO zx_rates_b_tmp

12594: END;
12595: ELSE
12596: BEGIN
12597: INSERT ALL
12598: INTO zx_rates_b_tmp
12599: (
12600: TAX_RATE_CODE ,
12601: EFFECTIVE_FROM ,
12602: EFFECTIVE_TO ,

Line 12709: zx_rates_b_s.nextval ,--TAX_RATE_ID

12705: ATTRIBUTE13 ,
12706: ATTRIBUTE14 ,
12707: ATTRIBUTE15 ,
12708: ATTRIBUTE_CATEGORY ,
12709: zx_rates_b_s.nextval ,--TAX_RATE_ID
12710: CONTENT_OWNER_ID ,
12711: fnd_global.user_id ,
12712: SYSDATE ,
12713: fnd_global.user_id ,

Line 12774: zx_rates_b_s.nextval ,--TAX_RATE_ID

12770: )
12771: VALUES
12772: (
12773: ZX_ACCOUNTS_S.nextval ,
12774: zx_rates_b_s.nextval ,--TAX_RATE_ID
12775: 'RATES' ,
12776: LEDGER_ID ,
12777: ORG_ID ,
12778: TAX_ACCOUNT_CCID ,

Line 12912: AND not exists (select 1 from zx_rates_b

12908: AND codes.org_id = ptp.party_id
12909: AND ptp.party_Type_code = 'OU'
12910: --Added following conditions for Sync process
12911: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
12912: AND not exists (select 1 from zx_rates_b
12913: where source_id = nvl(p_tax_id,codes.tax_id)
12914: )
12915: UNION ALL
12916:

Line 13014: AND not exists (select 1 from zx_rates_b

13010: AND codes.org_id = ptp.party_id
13011: AND ptp.party_Type_code = 'OU'
13012: --Added following conditions for Sync process
13013: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13014: AND not exists (select 1 from zx_rates_b
13015: where source_id = nvl(p_tax_id,codes.tax_id)
13016: ) ;
13017: EXCEPTION WHEN OTHERS THEN
13018: arp_util_tax.debug('Caught an error in the id clash portion for the disabled tax codes

Line 13033: INTO zx_rates_b_tmp

13029: IF L_MULTI_ORG_FLAG = 'Y'
13030: THEN
13031:
13032: INSERT ALL
13033: INTO zx_rates_b_tmp
13034: (
13035: TAX_RATE_CODE ,
13036: EFFECTIVE_FROM ,
13037: EFFECTIVE_TO ,

Line 13350: AND not exists (select 1 from zx_rates_b

13346:
13347: --Added following conditions for Sync process
13348: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13349: --BugFix 3605729 added nvl(source_id, in the following condition.
13350: AND not exists (select 1 from zx_rates_b
13351: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
13352: )
13353: UNION ALL
13354:

Line 13452: AND not exists (select 1 from zx_rates_b

13448:
13449: --Added following conditions for Sync process
13450: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13451: --BugFix 3605729 added nvl(source_id, in the following condition.
13452: AND not exists (select 1 from zx_rates_b
13453: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
13454: );
13455: ELSE
13456:

Line 13458: INTO zx_rates_b_tmp

13454: );
13455: ELSE
13456:
13457: INSERT ALL
13458: INTO zx_rates_b_tmp
13459: (
13460: TAX_RATE_CODE ,
13461: EFFECTIVE_FROM ,
13462: EFFECTIVE_TO ,

Line 13776: AND not exists (select 1 from zx_rates_b

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

Line 13879: AND not exists (select 1 from zx_rates_b

13875:
13876: --Added following conditions for Sync process
13877: AND codes.tax_id = nvl(p_tax_id,codes.tax_id)
13878: --BugFix 3605729 added nvl(source_id, in the following condition.
13879: AND not exists (select 1 from zx_rates_b
13880: where nvl(source_id,tax_rate_id) = nvl(p_tax_id,codes.tax_id)
13881: );
13882:
13883: END IF;

Line 13920: ZX_RATES_B RATES,

13916: L.LANGUAGE_CODE,
13917: userenv('LANG'),
13918: avtb.description
13919: FROM FND_LANGUAGES L,
13920: ZX_RATES_B RATES,
13921: ar_vat_tax_all_b avtb
13922: WHERE
13923: L.INSTALLED_FLAG in ('I', 'B')
13924: AND avtb.vat_tax_id = RATES.tax_rate_id

Line 13976: update zx_rates_b_tmp rates

13972: /*Stamp the default rate flag correctly for non recovery based rates
13973: Atleast one rate should have this flag set to 'Y' for a given combination
13974: of regime,tax, status and content owner */
13975:
13976: update zx_rates_b_tmp rates
13977: set rates.default_rate_flag = 'Y' ,
13978: rates.default_flg_effective_from = rates.effective_from, --Bug 5104891
13979: rates.default_flg_effective_to = rates.effective_to -- Bug 6680676
13980: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1

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

13976: update zx_rates_b_tmp rates
13977: set rates.default_rate_flag = 'Y' ,
13978: rates.default_flg_effective_from = rates.effective_from, --Bug 5104891
13979: rates.default_flg_effective_to = rates.effective_to -- Bug 6680676
13980: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
13981: where rates.tax_regime_code = rates1.tax_regime_code
13982: and rates.tax = rates1.tax
13983: and rates.tax_status_code = rates1.tax_status_code
13984: and rates.content_owner_id = rates1.content_owner_id

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

13988: and nvl(rates1.effective_to,sysdate)
13989: and rownum = 1)
13990: /* Not Exists is to prevent the default_rate_flag to be updated to 'Y' for 2 rates under the same combination of
13991: regime,tax,status and Content owner */
13992: and not exists (select 1 from zx_rates_b rates2
13993: where rates2.tax_regime_code = rates.tax_regime_code
13994: and rates2.tax = rates.tax
13995: and rates2.tax_status_code = rates.tax_status_code
13996: and rates2.content_owner_id = rates.content_owner_id

Line 14006: /* update zx_rates_b_tmp rates

14002: of regime ,tax, status and content owner */
14003:
14004: --Commenting out the logic as it is no longer required
14005: --Bug 5209434
14006: /* update zx_rates_b_tmp rates
14007: set rates.default_rate_flag = 'Y' ,
14008: rates.default_flg_effective_from = rates.effective_from --Bug 5104891
14009: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
14010: where rates.tax_regime_code = rates1.tax_regime_code

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

14005: --Bug 5209434
14006: /* update zx_rates_b_tmp rates
14007: set rates.default_rate_flag = 'Y' ,
14008: rates.default_flg_effective_from = rates.effective_from --Bug 5104891
14009: where rates.tax_rate_code in ( select rates1.tax_rate_code from zx_rates_b rates1
14010: where rates.tax_regime_code = rates1.tax_regime_code
14011: and rates.tax = rates1.tax
14012: and rates.tax_status_code = rates1.tax_status_code
14013: and rates.content_owner_id = rates1.content_owner_id

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

14016: and sysdate between rates1.effective_from
14017: and nvl(rates1.effective_to,sysdate)
14018: and rownum = 1)
14019:
14020: and not exists (select 1 from zx_rates_b rates2
14021: where rates2.tax_regime_code = rates.tax_regime_code
14022: and rates2.tax = rates.tax
14023: and rates2.tax_status_code = rates.tax_status_code
14024: and rates2.content_owner_id = rates.content_owner_id