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 949: INSERT INTO ZX_REGISTRATIONS

945: -- this logic has been transfered to Legal Entity Team
946:
947: --Bug 5228787
948: /*
949: INSERT INTO ZX_REGISTRATIONS
950: (
951: Registration_Id,
952: Registration_Type_Code,
953: Registration_Number,

Line 983: ZX_REGISTRATIONS_S.NEXTVAL

979: Last_Update_Date,
980: Last_Update_Login,
981: OBJECT_VERSION_NUMBER)
982: SELECT
983: ZX_REGISTRATIONS_S.NEXTVAL
984: ,Null -- Type
985: ,ptp.rep_registration_number --Registration_Number
986: ,'REGISTERED' -- Registration_Status_code
987: ,'EXPLICIT'

Line 1026: and not exists (select 1 from zx_registrations

1022: and decode(l_multi_org_flag,'N',l_org_id,HrOU.organization_id) =
1023: decode(l_multi_org_flag,'N',l_org_id,hroi.organization_id(+))
1024: AND HrOi.party_id = ptp.Party_id
1025: AND hrloc.global_attribute_category = 'JA.SG.PERWSLOC.LOC'
1026: and not exists (select 1 from zx_registrations
1027: where party_tax_profile_id = ptp.party_tax_profile_id
1028: and registration_number = ptp.rep_registration_number);
1029: */
1030:

Line 1054: INSERT INTO ZX_REGISTRATIONS

1050:
1051: IF (nvl(l_status,'N') in ('I','S') or nvl(l_db_status,'N') in ('I','S')) THEN
1052:
1053: -- Inserts Records for CNPJ
1054: INSERT INTO ZX_REGISTRATIONS
1055: (
1056: Registration_Id,
1057: Registration_Type_Code,
1058: Registration_Number,

Line 1085: ZX_REGISTRATIONS_S.NEXTVAL

1081: Last_Update_Date,
1082: Last_Update_Login,
1083: Object_Version_Number)
1084: SELECT
1085: ZX_REGISTRATIONS_S.NEXTVAL
1086: ,'CNPJ' -- Type
1087: ,jl.REGISTER_NUMBER||'/'||jl.REGISTER_SUBSIDIARY||'/'||jl.REGISTER_DIGIT Registration_Number
1088: ,'REGISTERED' -- Registration_Status_code
1089: ,'EXPLICIT'

Line 1124: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1120: and jl.set_of_books_id = gl.ledger_id
1121: and etb.legal_entity_id = gl.legal_entity_id
1122: and etb.party_id = ptp.party_id
1123: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1124: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1125: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1126: AND Registration_Type_Code = 'CNPJ'
1127: AND tax_regime_code = 'BR-IPI' );
1128:

Line 1133: from zx_registrations reg

1129: -- update rep_registation_number
1130: Update zx_party_tax_profile ptp
1131: Set rep_registration_number =
1132: (Select registration_number
1133: from zx_registrations reg
1134: where reg.party_tax_profile_id = ptp.party_tax_profile_id
1135: and Registration_Type_Code = 'CNPJ'
1136: and tax_regime_code = 'BR-IPI')
1137: Where ptp.party_tax_profile_id =

Line 1139: from zx_registrations reg

1135: and Registration_Type_Code = 'CNPJ'
1136: and tax_regime_code = 'BR-IPI')
1137: Where ptp.party_tax_profile_id =
1138: (Select reg.party_tax_profile_ID
1139: from zx_registrations reg
1140: where reg.party_tax_profile_id = ptp.party_tax_profile_id
1141: and Registration_Type_Code = 'CNPJ'
1142: and tax_regime_code = 'BR-IPI');
1143:

Line 1145: INSERT INTO ZX_REGISTRATIONS

1141: and Registration_Type_Code = 'CNPJ'
1142: and tax_regime_code = 'BR-IPI');
1143:
1144: -- Inserts Records for CNPJ
1145: INSERT INTO ZX_REGISTRATIONS
1146: (
1147: Registration_Id,
1148: Registration_Type_Code,
1149: Registration_Number,

Line 1176: ZX_REGISTRATIONS_S.NEXTVAL

1172: Last_Update_Date,
1173: Last_Update_Login,
1174: Object_Version_Number)
1175: SELECT
1176: ZX_REGISTRATIONS_S.NEXTVAL
1177: ,'STATE INSCRIPTION' -- Type
1178: ,jl.STATE_INSCRIPTION -- Registration_Number
1179: ,'REGISTERED' -- Registration_Status_code
1180: ,'EXPLICIT'

Line 1215: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1211: and jl.set_of_books_id = gl.ledger_id
1212: and etb.legal_entity_id = gl.legal_entity_id
1213: and etb.party_id = ptp.party_id
1214: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1215: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1216: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1217: AND Registration_Type_Code = 'STATE INSCRIPTION'
1218: AND tax_regime_code = 'BR-ICMS');
1219:

Line 1220: INSERT INTO ZX_REGISTRATIONS

1216: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1217: AND Registration_Type_Code = 'STATE INSCRIPTION'
1218: AND tax_regime_code = 'BR-ICMS');
1219:
1220: INSERT INTO ZX_REGISTRATIONS
1221: (
1222: Registration_Id,
1223: Registration_Type_Code,
1224: Registration_Number,

Line 1251: ZX_REGISTRATIONS_S.NEXTVAL

1247: Last_Update_Date,
1248: Last_Update_Login,
1249: OBJECT_VERSION_NUMBER)
1250: SELECT
1251: ZX_REGISTRATIONS_S.NEXTVAL
1252: ,'CITY INSCRIPTION' -- Type
1253: ,jl.MUNICIPAL_INSCRIPTION -- Registration_Number
1254: ,'REGISTERED' -- Registration_Status_code
1255: ,'EXPLICIT'

Line 1290: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1286: and jl.set_of_books_id = gl.ledger_id
1287: and etb.legal_entity_id = gl.legal_entity_id
1288: and etb.party_id = ptp.party_id
1289: and ptp.party_type_code = 'LEGAL_ESTABLISHMENT'
1290: AND NOT EXISTS (SELECT 1 FROM zx_registrations
1291: WHERE party_tax_profile_id = ptp.party_tax_profile_id
1292: AND registration_type_code = 'CITY INSCRIPTION'
1293: AND tax_regime_code = 'BR-ISS');
1294:

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

1352:
1353: /*
1354: The logic to create PTPs for suppliers is to loop through po_vendors based on
1355: po_vendors.party_id. TRN will be stored in zx_party_tax_profile it self. In
1356: this case no records will be created in zx_registrations.
1357: */
1358: /*
1359: Bug 4317072 as per this bug we would no longer be requiring the ad_parallel_update feature in the pls file
1360: Separate scripts have been written to deal with this feature

Line 1433: ZX_REGISTRATIONS(

1429:
1430:
1431: /*
1432: INSERT INTO
1433: ZX_REGISTRATIONS(
1434: Registration_Id,
1435: Registration_Type_Code,
1436: Registration_Number,
1437: Registration_Status_Code,

Line 1463: ZX_REGISTRATIONS_S.NEXTVAL

1459: Last_Update_Date,
1460: Last_Update_Login,
1461: OBJECT_VERSION_NUMBER)
1462: (SELECT
1463: ZX_REGISTRATIONS_S.NEXTVAL
1464: ,Null -- Type
1465: ,decode(pv.GLOBAL_ATTRIBUTE_CATEGORY,
1466: 'JL.AR.APXVDMVD.SUPPLIERS',pv.Global_Attribute12||pv.num_1099,
1467: 'JL.CL.APXVDMVD.SUPPLIERS',pv.Global_Attribute12||pv.num_1099,

Line 1503: and not exists (select 1 from zx_registrations

1499: zx_party_tax_profile PTP
1500: WHERE
1501: PV.Party_id = PTP.Party_ID
1502: AND PTP.Party_Type_code = 'SUPPLIER'
1503: and not exists (select 1 from zx_registrations
1504: WHERE party_tax_profile_id = ptp.party_tax_profile_id));
1505: */
1506:
1507: -- Bug # 3594759

Line 1520: -- ZX_REGISTRATIONS_STATUS lookup type

1516: nvl(l_db_status,'N') in ('I','S')) THEN
1517:
1518: -- Code to migrate the lookup code for the Lookup Type
1519: -- JLZZ_AP_VAT_REG_STAT_CODE into
1520: -- ZX_REGISTRATIONS_STATUS lookup type
1521: insert into fnd_lookup_values(
1522: LOOKUP_TYPE,
1523: LANGUAGE,
1524: LOOKUP_CODE,

Line 1556: 'ZX_REGISTRATIONS_STATUS',

1552: ATTRIBUTE13,
1553: ATTRIBUTE14,
1554: ATTRIBUTE15)
1555: (select
1556: 'ZX_REGISTRATIONS_STATUS',
1557: LANGUAGE,
1558: LOOKUP_CODE,
1559: MEANING,
1560: DESCRIPTION,

Line 1761: ZX_REGISTRATIONS(

1757:
1758: INSERT ALL
1759: WHEN (COUNTER > 1) then
1760: INTO
1761: ZX_REGISTRATIONS(
1762: Registration_Id,
1763: Registration_Type_Code,
1764: Registration_Number,
1765: Registration_Status_Code,

Line 1794: ZX_REGISTRATIONS_S.NEXTVAL,

1790: Last_Update_Login,
1791: Object_Version_Number)
1792: values
1793: (
1794: ZX_REGISTRATIONS_S.NEXTVAL,
1795: NULL, --Registration_Type_Code
1796: Registration_Number ,
1797: Registration_Status_Code,
1798: 'EXPLICIT' , -- Registration_Source_Code

Line 1863: and not exists (select 1 from zx_registrations

1859: pv.vendor_id = pvs.vendor_id
1860: AND PTP.party_id = pvs.party_site_id
1861: AND tax_attr_tab.party_site_id = pvs.party_site_id
1862: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
1863: and not exists (select 1 from zx_registrations
1864: WHERE party_tax_profile_id = ptp.party_tax_profile_id));
1865: */
1866:
1867:

Line 1935: ZX_REGISTRATIONS(

1931: WHERE party_id = pvs.VENDOR_SITE_ID and Party_Type_Code = 'SUPPLIER_SITE'));
1932:
1933:
1934: INSERT INTO
1935: ZX_REGISTRATIONS(
1936: Registration_Id,
1937: Registration_Type_Code,
1938: Registration_Number,
1939: Registration_Status_Code,

Line 1965: ZX_REGISTRATIONS_S.NEXTVAL

1961: Last_Update_Date,
1962: Last_Update_Login,
1963: OBJECT_VERSION_NUMBER)
1964: (SELECT
1965: ZX_REGISTRATIONS_S.NEXTVAL
1966: ,NULL -- Type
1967: ,PVS.VAT_Registration_Num --Reg Number
1968: ,'REGISTERED' -- Registration_Status_code
1969: ,'EXPLICIT' -- Registration_Source_Code

Line 2000: AND NOT EXISTS (SELECT 1 FROM zx_registrations

1996: WHERE
1997: PVS.vendor_site_id = PTP.Party_ID
1998: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
1999: AND PVS.Vendor_ID = PV.Vendor_ID
2000: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2001: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2002: AND Registration_Type_Code is null));*/
2003:
2004: --Commenting out this code since Brazilian GDFs are not being migrated as per bug 4054883*/

Line 2029: ZX_REGISTRATIONS(

2025:
2026:
2027: -- Inserts Records for CNPJ
2028: INSERT INTO
2029: ZX_REGISTRATIONS(
2030: Registration_Id,
2031: Registration_Type_Code,
2032: Registration_Number,
2033: Registration_Status_Code,

Line 2059: ZX_REGISTRATIONS_S.NEXTVAL

2055: Last_Update_Date,
2056: Last_Update_Login,
2057: Object_Version_Number)
2058: (SELECT
2059: ZX_REGISTRATIONS_S.NEXTVAL
2060: ,'CNPJ' -- Type
2061: ,PVS.Global_Attribute10||' / '||PVS.Global_Attribute11||' / '||PVS.Global_Attribute12 --Reg Number
2062: ,'REGISTERED' -- Registration_Status_code
2063: ,'EXPLICIT'

Line 2095: AND NOT EXISTS (SELECT 1 FROM zx_registrations

2091: PVS.vendor_site_id = PTP.Party_ID
2092: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
2093: AND PVS.Vendor_ID = PV.Vendor_ID
2094: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
2095: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2096: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2097: AND Registration_Type_Code = 'CNPJ'
2098: AND tax_regime_code = 'BR-IPI' ));
2099:

Line 2103: ZX_REGISTRATIONS(

2099:
2100: -- Inserts Records for State Inscription
2101:
2102: INSERT INTO
2103: ZX_REGISTRATIONS(
2104: Registration_Id,
2105: Registration_Type_Code,
2106: Registration_Number,
2107: Registration_Status_Code,

Line 2133: ZX_REGISTRATIONS_S.NEXTVAL

2129: Last_Update_Date,
2130: Last_Update_Login,
2131: OBJECT_VERSION_NUMBER)
2132: (SELECT
2133: ZX_REGISTRATIONS_S.NEXTVAL
2134: ,'STATE INSCRIPTION' -- Type
2135: ,PVS.Global_Attribute13 -- State Registration Num
2136: ,'REGISTERED' -- Registration_Status_Code
2137: ,'EXPLICIT'

Line 2169: AND NOT EXISTS (SELECT 1 FROM zx_registrations

2165: PVS.vendor_site_id = PTP.Party_ID
2166: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
2167: AND PVS.Vendor_ID = PV.Vendor_ID
2168: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
2169: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2170: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2171: AND Registration_Type_Code = 'STATE INSCRIPTION'
2172: AND tax_regime_code= 'BR-ICMS' ));
2173:

Line 2177: ZX_REGISTRATIONS(

2173:
2174: -- Inserts Records for Municipal Inscription
2175:
2176: INSERT INTO
2177: ZX_REGISTRATIONS(
2178: Registration_Id,
2179: Registration_Type_Code,
2180: Registration_Number,
2181: Registration_Status_Code,

Line 2207: ZX_REGISTRATIONS_S.NEXTVAL

2203: Last_Update_Date,
2204: Last_Update_Login,
2205: OBJECT_VERSION_NUMBER)
2206: (SELECT
2207: ZX_REGISTRATIONS_S.NEXTVAL
2208: ,'CITY INSCRIPTION' -- Type
2209: ,PVS.Global_Attribute14 -- City Registration Num
2210: ,'REGISTERED' -- Registration_Status_Code
2211: ,'EXPLICIT'

Line 2243: AND NOT EXISTS (SELECT 1 FROM zx_registrations

2239: PVS.vendor_site_id = PTP.Party_ID
2240: AND PTP.Party_Type_code = 'SUPPLIER_SITE'
2241: AND PVS.Vendor_ID = PV.Vendor_ID
2242: AND pvs.GLOBAL_ATTRIBUTE_CATEGORY = 'JL.BR.APXVDMVD.SITES'
2243: AND NOT EXISTS (SELECT 1 FROM zx_registrations
2244: WHERE party_tax_profile_id = ptp.party_tax_profile_id
2245: AND registration_type_code = 'CITY INSCRIPTION'
2246: AND tax_regime_code = 'BR-ISS' ));
2247:

Line 3179: -- ZX_REGISTRATIONS_STATUS lookup type

3175: nvl(l_db_status,'N') in ('I','S')) THEN
3176:
3177: -- Code to migrate the lookup code for the Lookup Type
3178: -- JLZZ_AP_VAT_REG_STAT_CODE into
3179: -- ZX_REGISTRATIONS_STATUS lookup type
3180: insert into fnd_lookup_values(
3181: LOOKUP_TYPE,
3182: LANGUAGE,
3183: LOOKUP_CODE,

Line 3215: 'ZX_REGISTRATIONS_STATUS',

3211: ATTRIBUTE13,
3212: ATTRIBUTE14,
3213: ATTRIBUTE15)
3214: (select
3215: 'ZX_REGISTRATIONS_STATUS',
3216: LANGUAGE,
3217: LOOKUP_CODE,
3218: MEANING,
3219: DESCRIPTION,