DBA Data[Home] [Help]

APPS.ZX_PTP_MIGRATE_PKG dependencies on ZX_REGISTRATIONS

Line 88: INTO ZX_REGISTRATIONS (

84: arp_util_tax.debug('ZX_CREATE_REG(+)');
85:
86:
87: INSERT
88: INTO ZX_REGISTRATIONS (
89: Registration_Id,
90: Registration_Type_Code,
91: Registration_Number,
92: Registration_Status_Code,

Line 125: ZX_REGISTRATIONS_S.NEXTVAL, --Registration Id

121: PROGRAM_LOGIN_ID,
122: OBJECT_VERSION_NUMBER)
123: SELECT
124:
125: ZX_REGISTRATIONS_S.NEXTVAL, --Registration Id
126: NULL, --Registration_Type_Code
127: p_reg_info , --Registration Number
128: 'REGISTERED', --Registration Status Code
129: 'EXPLICIT', --Registration Source Code

Line 164: (SELECT 1 FROM ZX_REGISTRATIONS WHERE REGISTRATION_NUMBER=p_reg_info

160: FROM ZX_PARTY_TAX_PROFILE
161:
162: WHERE PARTY_TAX_PROFILE_ID=p_ptp_id
163: AND NOT EXISTS
164: (SELECT 1 FROM ZX_REGISTRATIONS WHERE REGISTRATION_NUMBER=p_reg_info
165: AND party_tax_profile_id = p_ptp_id);
166:
167: arp_util_tax.debug('ZX_CREATE_REG(-)');
168:

Line 829: INSERT INTO ZX_REGISTRATIONS

825: -- this logic has been transfered to Legal Entity Team
826:
827: --Bug 5228787
828: /*
829: INSERT INTO ZX_REGISTRATIONS
830: (
831: Registration_Id,
832: Registration_Type_Code,
833: Registration_Number,

Line 863: ZX_REGISTRATIONS_S.NEXTVAL

859: Last_Update_Date,
860: Last_Update_Login,
861: OBJECT_VERSION_NUMBER)
862: SELECT
863: ZX_REGISTRATIONS_S.NEXTVAL
864: ,Null -- Type
865: ,ptp.rep_registration_number --Registration_Number
866: ,'REGISTERED' -- Registration_Status_code
867: ,'EXPLICIT'

Line 906: and not exists (select 1 from zx_registrations

902: and decode(l_multi_org_flag,'N',l_org_id,HrOU.organization_id) =
903: decode(l_multi_org_flag,'N',l_org_id,hroi.organization_id(+))
904: AND HrOi.party_id = ptp.Party_id
905: AND hrloc.global_attribute_category = 'JA.SG.PERWSLOC.LOC'
906: and not exists (select 1 from zx_registrations
907: where party_tax_profile_id = ptp.party_tax_profile_id
908: and registration_number = ptp.rep_registration_number);
909: */
910:

Line 934: INSERT INTO ZX_REGISTRATIONS

930:
931: IF (nvl(l_status,'N') in ('I','S') or nvl(l_db_status,'N') in ('I','S')) THEN
932:
933: -- Inserts Records for CNPJ
934: INSERT INTO ZX_REGISTRATIONS
935: (
936: Registration_Id,
937: Registration_Type_Code,
938: Registration_Number,

Line 965: ZX_REGISTRATIONS_S.NEXTVAL

961: Last_Update_Date,
962: Last_Update_Login,
963: Object_Version_Number)
964: SELECT
965: ZX_REGISTRATIONS_S.NEXTVAL
966: ,'CNPJ' -- Type
967: ,jl.REGISTER_NUMBER||'/'||jl.REGISTER_SUBSIDIARY||'/'||jl.REGISTER_DIGIT Registration_Number
968: ,'REGISTERED' -- Registration_Status_code
969: ,'EXPLICIT'

Line 1004: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1000: and jl.set_of_books_id = gl.ledger_id
1001: and etb.legal_entity_id = gl.legal_entity_id
1002: and etb.party_id = ptp.party_id
1003: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1004: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1005: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1006: AND Registration_Type_Code = 'CNPJ'
1007: AND tax_regime_code = 'BR-IPI' );
1008:

Line 1013: from zx_registrations reg

1009: -- update rep_registation_number
1010: Update zx_party_tax_profile ptp
1011: Set rep_registration_number =
1012: (Select registration_number
1013: from zx_registrations reg
1014: where reg.party_tax_profile_id = ptp.party_tax_profile_id
1015: and Registration_Type_Code = 'CNPJ'
1016: and tax_regime_code = 'BR-IPI')
1017: Where ptp.party_tax_profile_id =

Line 1019: from zx_registrations reg

1015: and Registration_Type_Code = 'CNPJ'
1016: and tax_regime_code = 'BR-IPI')
1017: Where ptp.party_tax_profile_id =
1018: (Select reg.party_tax_profile_ID
1019: from zx_registrations reg
1020: where reg.party_tax_profile_id = ptp.party_tax_profile_id
1021: and Registration_Type_Code = 'CNPJ'
1022: and tax_regime_code = 'BR-IPI');
1023:

Line 1025: INSERT INTO ZX_REGISTRATIONS

1021: and Registration_Type_Code = 'CNPJ'
1022: and tax_regime_code = 'BR-IPI');
1023:
1024: -- Inserts Records for CNPJ
1025: INSERT INTO ZX_REGISTRATIONS
1026: (
1027: Registration_Id,
1028: Registration_Type_Code,
1029: Registration_Number,

Line 1056: ZX_REGISTRATIONS_S.NEXTVAL

1052: Last_Update_Date,
1053: Last_Update_Login,
1054: Object_Version_Number)
1055: SELECT
1056: ZX_REGISTRATIONS_S.NEXTVAL
1057: ,'STATE INSCRIPTION' -- Type
1058: ,jl.STATE_INSCRIPTION -- Registration_Number
1059: ,'REGISTERED' -- Registration_Status_code
1060: ,'EXPLICIT'

Line 1095: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1091: and jl.set_of_books_id = gl.ledger_id
1092: and etb.legal_entity_id = gl.legal_entity_id
1093: and etb.party_id = ptp.party_id
1094: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1095: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1096: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1097: AND Registration_Type_Code = 'STATE INSCRIPTION'
1098: AND tax_regime_code = 'BR-ICMS');
1099:

Line 1100: INSERT INTO ZX_REGISTRATIONS

1096: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1097: AND Registration_Type_Code = 'STATE INSCRIPTION'
1098: AND tax_regime_code = 'BR-ICMS');
1099:
1100: INSERT INTO ZX_REGISTRATIONS
1101: (
1102: Registration_Id,
1103: Registration_Type_Code,
1104: Registration_Number,

Line 1131: ZX_REGISTRATIONS_S.NEXTVAL

1127: Last_Update_Date,
1128: Last_Update_Login,
1129: OBJECT_VERSION_NUMBER)
1130: SELECT
1131: ZX_REGISTRATIONS_S.NEXTVAL
1132: ,'CITY INSCRIPTION' -- Type
1133: ,jl.MUNICIPAL_INSCRIPTION -- Registration_Number
1134: ,'REGISTERED' -- Registration_Status_code
1135: ,'EXPLICIT'

Line 1170: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1166: and jl.set_of_books_id = gl.ledger_id
1167: and etb.legal_entity_id = gl.legal_entity_id
1168: and etb.party_id = ptp.party_id
1169: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1170: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1171: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1172: AND registration_type_code = 'CITY INSCRIPTION'
1173: AND tax_regime_code = 'BR-ISS');
1174:

Line 1236: this case no records will be created in zx_registrations.

1232:
1233: /*
1234: The logic to create PTPs for suppliers is to loop through po_vendors based on
1235: po_vendors.party_id. TRN will be stored in zx_party_tax_profile it self. In
1236: this case no records will be created in zx_registrations.
1237: */
1238: /*
1239: Bug 4317072 as per this bug we would no longer be requiring the ad_parallel_update feature in the pls file
1240: Separate scripts have been written to deal with this feature

Line 1313: ZX_REGISTRATIONS(

1309:
1310:
1311: /*
1312: INSERT INTO
1313: ZX_REGISTRATIONS(
1314: Registration_Id,
1315: Registration_Type_Code,
1316: Registration_Number,
1317: Registration_Status_Code,

Line 1343: ZX_REGISTRATIONS_S.NEXTVAL

1339: Last_Update_Date,
1340: Last_Update_Login,
1341: OBJECT_VERSION_NUMBER)
1342: (SELECT
1343: ZX_REGISTRATIONS_S.NEXTVAL
1344: ,Null -- Type
1345: ,decode(pv.GLOBAL_ATTRIBUTE_CATEGORY,
1346: 'JL.AR.APXVDMVD.SUPPLIERS',pv.Global_Attribute12||pv.num_1099,
1347: 'JL.CL.APXVDMVD.SUPPLIERS',pv.Global_Attribute12||pv.num_1099,

Line 1383: and not exists (select 1 from zx_registrations

1379: zx_party_tax_profile PTP
1380: WHERE
1381: PV.Party_id = PTP.Party_ID
1382: AND PTP.Party_Type_code = 'SUPPLIER'
1383: and not exists (select 1 from zx_registrations
1384: WHERE party_tax_profile_id = ptp.party_tax_profile_id));
1385: */
1386:
1387: -- Bug # 3594759

Line 1400: -- ZX_REGISTRATIONS_STATUS lookup type

1396: nvl(l_db_status,'N') in ('I','S')) THEN
1397:
1398: -- Code to migrate the lookup code for the Lookup Type
1399: -- JLZZ_AP_VAT_REG_STAT_CODE into
1400: -- ZX_REGISTRATIONS_STATUS lookup type
1401: insert into fnd_lookup_values(
1402: LOOKUP_TYPE,
1403: LANGUAGE,
1404: LOOKUP_CODE,

Line 1436: 'ZX_REGISTRATIONS_STATUS',

1432: ATTRIBUTE13,
1433: ATTRIBUTE14,
1434: ATTRIBUTE15)
1435: (select
1436: 'ZX_REGISTRATIONS_STATUS',
1437: LANGUAGE,
1438: LOOKUP_CODE,
1439: MEANING,
1440: DESCRIPTION,

Line 1641: ZX_REGISTRATIONS(

1637:
1638: INSERT ALL
1639: WHEN (COUNTER > 1) then
1640: INTO
1641: ZX_REGISTRATIONS(
1642: Registration_Id,
1643: Registration_Type_Code,
1644: Registration_Number,
1645: Registration_Status_Code,

Line 1674: ZX_REGISTRATIONS_S.NEXTVAL,

1670: Last_Update_Login,
1671: Object_Version_Number)
1672: values
1673: (
1674: ZX_REGISTRATIONS_S.NEXTVAL,
1675: NULL, --Registration_Type_Code
1676: Registration_Number ,
1677: Registration_Status_Code,
1678: 'EXPLICIT' , -- Registration_Source_Code

Line 1743: and not exists (select 1 from zx_registrations

1739: pv.vendor_id = pvs.vendor_id
1740: AND PTP.party_id = pvs.party_site_id
1741: AND tax_attr_tab.party_site_id = pvs.party_site_id
1742: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
1743: and not exists (select 1 from zx_registrations
1744: WHERE party_tax_profile_id = ptp.party_tax_profile_id));
1745: */
1746:
1747:

Line 1815: ZX_REGISTRATIONS(

1811: WHERE party_id = pvs.VENDOR_SITE_ID and Party_Type_Code = 'SUPPLIER_SITE'));
1812:
1813:
1814: INSERT INTO
1815: ZX_REGISTRATIONS(
1816: Registration_Id,
1817: Registration_Type_Code,
1818: Registration_Number,
1819: Registration_Status_Code,

Line 1845: ZX_REGISTRATIONS_S.NEXTVAL

1841: Last_Update_Date,
1842: Last_Update_Login,
1843: OBJECT_VERSION_NUMBER)
1844: (SELECT
1845: ZX_REGISTRATIONS_S.NEXTVAL
1846: ,NULL -- Type
1847: ,PVS.VAT_Registration_Num --Reg Number
1848: ,'REGISTERED' -- Registration_Status_code
1849: ,'EXPLICIT' -- Registration_Source_Code

Line 1880: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1876: WHERE
1877: PVS.vendor_site_id = PTP.Party_ID
1878: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
1879: AND PVS.Vendor_ID = PV.Vendor_ID
1880: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1881: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1882: AND Registration_Type_Code is null));*/
1883:
1884: --Commenting out this code since Brazilian GDFs are not being migrated as per bug 4054883*/

Line 1909: ZX_REGISTRATIONS(

1905:
1906:
1907: -- Inserts Records for CNPJ
1908: INSERT INTO
1909: ZX_REGISTRATIONS(
1910: Registration_Id,
1911: Registration_Type_Code,
1912: Registration_Number,
1913: Registration_Status_Code,

Line 1939: ZX_REGISTRATIONS_S.NEXTVAL

1935: Last_Update_Date,
1936: Last_Update_Login,
1937: Object_Version_Number)
1938: (SELECT
1939: ZX_REGISTRATIONS_S.NEXTVAL
1940: ,'CNPJ' -- Type
1941: ,PVS.Global_Attribute10||' / '||PVS.Global_Attribute11||' / '||PVS.Global_Attribute12 --Reg Number
1942: ,'REGISTERED' -- Registration_Status_code
1943: ,'EXPLICIT'

Line 1975: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1971: PVS.vendor_site_id = PTP.Party_ID
1972: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
1973: AND PVS.Vendor_ID = PV.Vendor_ID
1974: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
1975: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1976: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1977: AND Registration_Type_Code = 'CNPJ'
1978: AND tax_regime_code = 'BR-IPI' ));
1979:

Line 1983: ZX_REGISTRATIONS(

1979:
1980: -- Inserts Records for State Inscription
1981:
1982: INSERT INTO
1983: ZX_REGISTRATIONS(
1984: Registration_Id,
1985: Registration_Type_Code,
1986: Registration_Number,
1987: Registration_Status_Code,

Line 2013: ZX_REGISTRATIONS_S.NEXTVAL

2009: Last_Update_Date,
2010: Last_Update_Login,
2011: OBJECT_VERSION_NUMBER)
2012: (SELECT
2013: ZX_REGISTRATIONS_S.NEXTVAL
2014: ,'STATE INSCRIPTION' -- Type
2015: ,PVS.Global_Attribute13 -- State Registration Num
2016: ,'REGISTERED' -- Registration_Status_Code
2017: ,'EXPLICIT'

Line 2049: AND NOT EXISTS (SELECT 1 FROM zx_registrations

2045: PVS.vendor_site_id = PTP.Party_ID
2046: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
2047: AND PVS.Vendor_ID = PV.Vendor_ID
2048: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
2049: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2050: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2051: AND Registration_Type_Code = 'STATE INSCRIPTION'
2052: AND tax_regime_code= 'BR-ICMS' ));
2053:

Line 2057: ZX_REGISTRATIONS(

2053:
2054: -- Inserts Records for Municipal Inscription
2055:
2056: INSERT INTO
2057: ZX_REGISTRATIONS(
2058: Registration_Id,
2059: Registration_Type_Code,
2060: Registration_Number,
2061: Registration_Status_Code,

Line 2087: ZX_REGISTRATIONS_S.NEXTVAL

2083: Last_Update_Date,
2084: Last_Update_Login,
2085: OBJECT_VERSION_NUMBER)
2086: (SELECT
2087: ZX_REGISTRATIONS_S.NEXTVAL
2088: ,'CITY INSCRIPTION' -- Type
2089: ,PVS.Global_Attribute14 -- City Registration Num
2090: ,'REGISTERED' -- Registration_Status_Code
2091: ,'EXPLICIT'

Line 2123: AND NOT EXISTS (SELECT 1 FROM zx_registrations

2119: PVS.vendor_site_id = PTP.Party_ID
2120: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
2121: AND PVS.Vendor_ID = PV.Vendor_ID
2122: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
2123: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2124: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2125: AND registration_type_code = 'CITY INSCRIPTION'
2126: AND tax_regime_code = 'BR-ISS' ));
2127:

Line 3059: -- ZX_REGISTRATIONS_STATUS lookup type

3055: nvl(l_db_status,'N') in ('I','S')) THEN
3056:
3057: -- Code to migrate the lookup code for the Lookup Type
3058: -- JLZZ_AP_VAT_REG_STAT_CODE into
3059: -- ZX_REGISTRATIONS_STATUS lookup type
3060: insert into fnd_lookup_values(
3061: LOOKUP_TYPE,
3062: LANGUAGE,
3063: LOOKUP_CODE,

Line 3095: 'ZX_REGISTRATIONS_STATUS',

3091: ATTRIBUTE13,
3092: ATTRIBUTE14,
3093: ATTRIBUTE15)
3094: (select
3095: 'ZX_REGISTRATIONS_STATUS',
3096: LANGUAGE,
3097: LOOKUP_CODE,
3098: MEANING,
3099: DESCRIPTION,