DBA Data[Home] [Help]

APPS.ZX_API_PUB dependencies on ZX_LINES_DET_FACTORS

Line 39: FROM ZX_LINES_DET_FACTORS

35:
36: /*Lock the rows for entire document*/
37: CURSOR lock_line_det_factors_for_doc(trx_rec IN event_class_rec_type) IS
38: SELECT *
39: FROM ZX_LINES_DET_FACTORS
40: WHERE application_id = trx_rec.application_id
41: AND entity_code = trx_rec.entity_code
42: AND event_class_code = trx_rec.event_class_code
43: AND trx_id = trx_rec.trx_id

Line 128: UPDATE zx_lines_det_factors

124: IF l_count > 0 THEN
125:
126: FORALL j IN 1 .. l_count
127:
128: UPDATE zx_lines_det_factors
129: SET total_inc_tax_amt = l_trx_line_tbl.total_inc_tax_amt(j)
130: WHERE application_id = p_event_class_rec.application_id
131: AND entity_code = p_event_class_rec.entity_code
132: AND event_class_code = p_event_class_rec.event_class_code

Line 490: DELETE from zx_lines_det_factors

486: -- un-deleted data in the Det Factors table for the previousc all. So, we need to clean it up first before
487: -- starting to process the input lines of the new call.We should at first always attempt to remove any rows
488: --sitting in Det Factors table for that icx session
489: /* IF l_event_class_rec.ICX_SESSION_ID is not null THEN
490: DELETE from zx_lines_det_factors
491: WHERE application_id = l_event_class_rec.application_id and
492: entity_code = l_event_class_rec.entity_code and
493: event_class_code = l_event_class_rec.event_class_code and
494: trx_id = l_event_class_rec.trx_id;

Line 890: --select ZX_LINES_DET_FACTORS_S.nextval

886: /*-----------------------------------------+
887: | Get the event id for the whole document |
888: +-----------------------------------------*/
889: --Bug 7650433
890: --select ZX_LINES_DET_FACTORS_S.nextval
891: --into l_event_id
892: --from dual;
893:
894: OPEN event_classes;

Line 947: select ZX_LINES_DET_FACTORS_S.nextval

943: FOR i IN 1..nvl(l_evnt_cls.event_class_code.LAST,0)
944: LOOP
945:
946: --Bug 7650433
947: select ZX_LINES_DET_FACTORS_S.nextval
948: into l_event_id
949: from dual;
950:
951: IF l_evnt_cls.event_class_code(i) = 'CREDIT_MEMO' THEN

Line 1074: MERGE INTO ZX_LINES_DET_FACTORS lines_dt

1070: END IF;
1071: */
1072:
1073: IF zx_global_structures_pkg.g_event_class_rec.prod_family_grp_code = 'P2P' THEN
1074: MERGE INTO ZX_LINES_DET_FACTORS lines_dt
1075: USING (SELECT
1076: application_id,
1077: entity_code,
1078: event_class_code,

Line 1207: DELETE FROM zx_lines_det_factors

1203:
1204:
1205: FORALL i IN l_trx_id_tbl.FIRST .. l_trx_id_tbl.LAST
1206: */
1207: DELETE FROM zx_lines_det_factors
1208: WHERE (APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID) IN
1209: (SELECT /*+ cardinality (ZX_TRX_HEADERS_GT 1) */
1210: APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID
1211: FROM ZX_TRX_HEADERS_GT);

Line 1258: DELETE from zx_lines_det_factors

1254: LIMIT G_LINES_PER_FETCH;
1255:
1256: FORALL i IN l_trx_id_tbl.FIRST .. l_trx_id_tbl.LAST
1257:
1258: DELETE from zx_lines_det_factors
1259: WHERE APPLICATION_ID = l_application_id_tbl(i)
1260: AND ENTITY_CODE = l_entity_code_tbl(i)
1261: AND EVENT_CLASS_CODE = l_event_class_code_tbl(i)
1262: AND TRX_ID = l_trx_id_tbl(i)

Line 1266: DELETE /*+ ORDERED USE_NL_WITH_INDEX (Z,ZX_LINES_DET_FACTORS_U1) */ FROM zx_lines_det_factors Z

1262: AND TRX_ID = l_trx_id_tbl(i)
1263: AND line_level_action ='DELETE';
1264:
1265: */
1266: DELETE /*+ ORDERED USE_NL_WITH_INDEX (Z,ZX_LINES_DET_FACTORS_U1) */ FROM zx_lines_det_factors Z
1267: WHERE (Z.APPLICATION_ID, Z.ENTITY_CODE, Z.EVENT_CLASS_CODE, Z.TRX_ID)
1268: IN (SELECT /*+ unnest cardinality (ZX_TRX_HEADERS_GT 1) */
1269: APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID
1270: FROM ZX_TRX_HEADERS_GT)

Line 1307: UPDATE zx_lines_det_factors

1303: -- Bug Fix for 5155481 - Commented out the following update. Reporting flag is set during the
1304: -- insert itself based on the record_flag.
1305:
1306: /* IF l_event_class_rec.QUOTE_FLAG = 'Y' THEN
1307: UPDATE zx_lines_det_factors
1308: SET tax_reporting_flag ='N'
1309: WHERE application_id = l_event_class_rec.application_id
1310: AND entity_code = l_event_class_rec.entity_code
1311: AND event_class_code = l_event_class_rec.event_class_code

Line 1337: FROM ZX_LINES_DET_FACTORS lines

1333: +--------------------------------------------------------*/
1334: BEGIN
1335: UPDATE ZX_TRX_HEADERS_GT headers
1336: SET doc_level_recalc_flag = (SELECT distinct(lines.threshold_indicator_flag)
1337: FROM ZX_LINES_DET_FACTORS lines
1338: WHERE lines.application_id = headers.application_id
1339: AND lines.event_class_code = headers.event_class_code
1340: AND lines.entity_code = headers.entity_code
1341: AND lines.trx_id = headers.trx_id

Line 1645: select ZX_LINES_DET_FACTORS_S.nextval

1641: | Copy to Event Class Record |
1642: +------------------------------------------------------*/
1643:
1644: /*Fetch the event id for the document*/
1645: select ZX_LINES_DET_FACTORS_S.nextval
1646: into l_event_class_rec.event_id
1647: from dual;
1648:
1649: /*Populate the event class record structure*/

Line 1722: FROM ZX_LINES_DET_FACTORS

1718: l_event_class_rec.RDNG_SHIP_TO_PTY_TX_P_ST_ID,
1719: l_event_class_rec.RDNG_SHIP_FROM_PTY_TX_P_ST_ID,
1720: l_event_class_rec.RDNG_BILL_TO_PTY_TX_P_ST_ID,
1721: l_event_class_rec.RDNG_BILL_FROM_PTY_TX_P_ST_ID
1722: FROM ZX_LINES_DET_FACTORS
1723: WHERE application_id = p_transaction_rec.application_id
1724: AND entity_code = p_transaction_rec.entity_code
1725: AND event_class_code = p_transaction_rec.event_class_code
1726: AND trx_id = p_transaction_rec.trx_id

Line 1763: DELETE from zx_lines_det_factors

1759: -- un-deleted data in the Det Factors table for the previousc all. So, we need to clean it up first before
1760: -- starting to process the input lines of the new call.We should at first always attempt to remove any rows
1761: --sitting in Det Factors table for that icx session
1762: /* IF l_event_class_rec.ICX_SESSION_ID is not null THEN
1763: DELETE from zx_lines_det_factors
1764: WHERE application_id = l_event_class_rec.application_id and
1765: entity_code = l_event_class_rec.entity_code and
1766: event_class_code = l_event_class_rec.event_class_code and
1767: trx_id = l_event_class_rec.trx_id;

Line 2007: MERGE INTO ZX_LINES_DET_FACTORS lines_dt

2003: END IF;
2004: */
2005:
2006: IF zx_global_structures_pkg.g_event_class_rec.prod_family_grp_code = 'P2P' THEN
2007: MERGE INTO ZX_LINES_DET_FACTORS lines_dt
2008: USING (SELECT
2009: application_id,
2010: entity_code,
2011: event_class_code,

Line 2109: FROM ZX_LINES_DET_FACTORS

2105: +--------------------------------------------------------*/
2106: BEGIN
2107: SELECT threshold_indicator_flag
2108: INTO x_doc_level_recalc_flag
2109: FROM ZX_LINES_DET_FACTORS
2110: WHERE application_id = l_event_class_rec.application_id
2111: AND event_class_code = l_event_class_rec.event_class_code
2112: AND entity_code = l_event_class_rec.entity_code
2113: AND trx_id = l_event_class_rec.trx_id

Line 2132: DELETE from zx_lines_det_factors

2128: l_event_class_rec.quote_flag = 'Y' and
2129: l_event_class_rec.intgrtn_det_factors_ui_flag = 'N' and
2130: l_event_class_rec.icx_session_id is null) THEN
2131: --Delete lines for transaction header which need not be recorded
2132: DELETE from zx_lines_det_factors
2133: WHERE application_id = l_event_class_rec.application_id
2134: AND entity_code = l_event_class_rec.entity_code
2135: AND event_class_code = l_event_class_rec.event_class_code
2136: AND trx_id = l_event_class_rec.trx_id;

Line 2145: UPDATE zx_lines_det_factors

2141: -- Bug Fix for 5155481 - Commented out the following update. Reporting flag is set during the
2142: -- insert itself based on the record_flag.
2143:
2144: /* IF l_event_class_rec.QUOTE_FLAG = 'Y' THEN
2145: UPDATE zx_lines_det_factors
2146: SET tax_reporting_flag ='N'
2147: WHERE application_id = l_event_class_rec.application_id
2148: AND entity_code = l_event_class_rec.entity_code
2149: AND event_class_code = l_event_class_rec.event_class_code

Line 2158: DELETE FROM ZX_LINES_DET_FACTORS

2154:
2155: /*-----------------------------------------------------+
2156: | Handle delete for mark tax lines deleted |
2157: +-----------------------------------------------------*/
2158: DELETE FROM ZX_LINES_DET_FACTORS
2159: WHERE line_level_action ='DELETE'
2160: AND application_id = l_event_class_rec.application_id
2161: AND entity_code = l_event_class_rec.entity_code
2162: AND event_class_code = l_event_class_rec.event_class_code

Line 2170: DELETE from zx_lines_det_factors

2166: | Bug 4948674: Handle delete for O2C products when icx_session_id is NOT NULL |
2167: +------------------------------------------------------------------------------*/
2168: IF l_event_class_rec.ICX_SESSION_ID is not null AND
2169: l_event_class_rec.PROD_FAMILY_GRP_CODE = 'O2C' THEN
2170: DELETE from zx_lines_det_factors
2171: WHERE application_id = l_event_class_rec.application_id and
2172: entity_code = l_event_class_rec.entity_code and
2173: event_class_code = l_event_class_rec.event_class_code and
2174: trx_id = l_event_class_rec.trx_id and

Line 2492: --select ZX_LINES_DET_FACTORS_S.nextval

2488: /*-----------------------------------------+
2489: | Get the event id for the whole document |
2490: +-----------------------------------------*/
2491: --Bug 7650433
2492: --select ZX_LINES_DET_FACTORS_S.nextval
2493: --into l_event_id
2494: --from dual;
2495:
2496: OPEN event_classes;

Line 2581: select ZX_LINES_DET_FACTORS_S.nextval

2577: +-----------------------------------------*/
2578: FOR i IN 1..nvl(l_evnt_cls.event_class_code.LAST,0)
2579: LOOP
2580: --Bug 7650433
2581: select ZX_LINES_DET_FACTORS_S.nextval
2582: into l_event_id
2583: from dual;
2584: -- added for bug fix 5417887
2585: IF l_evnt_cls.event_class_code(i) = 'CREDIT_MEMO' THEN

Line 3113: zx_lines_det_factors

3109:
3110: SELECT distinct internal_organization_id into
3111: l_event_class_rec.internal_organization_id
3112: FROM
3113: zx_lines_det_factors
3114: WHERE
3115: application_id = p_sync_trx_rec.application_id
3116: AND entity_code = p_sync_trx_rec.entity_code
3117: AND event_class_code = p_sync_trx_rec.event_class_code

Line 3126: | Update zx_lines_det_factors |

3122: NULL;
3123: END;
3124:
3125: /*--------------------------------------------------+
3126: | Update zx_lines_det_factors |
3127: +--------------------------------------------------*/
3128: /*Retrieve the sequence id since it has to be same for all updated rows*/
3129: select ZX_LINES_DET_FACTORS_S.nextval
3130: INTO l_event_class_rec.event_id

Line 3129: select ZX_LINES_DET_FACTORS_S.nextval

3125: /*--------------------------------------------------+
3126: | Update zx_lines_det_factors |
3127: +--------------------------------------------------*/
3128: /*Retrieve the sequence id since it has to be same for all updated rows*/
3129: select ZX_LINES_DET_FACTORS_S.nextval
3130: INTO l_event_class_rec.event_id
3131: FROM dual;
3132:
3133: IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 3201: UPDATE ZX_LINES_DET_FACTORS SET

3197: AND TRX_ID = p_sync_trx_rec.TRX_ID;
3198: END IF;
3199:
3200: /* update the header level attributes*/
3201: UPDATE ZX_LINES_DET_FACTORS SET
3202: EVENT_ID = l_event_class_rec.event_id,
3203: --EVENT_TYPE_CODE = p_sync_trx_rec.EVENT_TYPE_CODE, /*bug 3922983*/
3204: TRX_NUMBER = p_sync_trx_rec.TRX_NUMBER,
3205: TRX_DESCRIPTION = p_sync_trx_rec.TRX_DESCRIPTION,

Line 3246: UPDATE ZX_LINES_DET_FACTORS SET

3242: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3243: END IF;
3244: END IF;
3245: /* update the header level attributes*/
3246: UPDATE ZX_LINES_DET_FACTORS SET
3247: EVENT_ID = l_event_class_rec.event_id,
3248: --EVENT_TYPE_CODE = p_sync_trx_rec.EVENT_TYPE_CODE, /*bug 3922983*/
3249: TRX_NUMBER = p_sync_trx_rec.TRX_NUMBER,
3250: TRX_DESCRIPTION = p_sync_trx_rec.TRX_DESCRIPTION,

Line 3301: UPDATE ZX_LINES_DET_FACTORS SET

3297:
3298: /* update the line level attributes if passed*/
3299: IF (p_sync_trx_lines_tbl.APPLICATION_ID.EXISTS(1)) THEN
3300: FORALL i IN 1..nvl(p_sync_trx_lines_tbl.APPLICATION_ID.LAST,-99)
3301: UPDATE ZX_LINES_DET_FACTORS SET
3302: TRX_LEVEL_TYPE = p_sync_trx_lines_tbl.TRX_LEVEL_TYPE(i),
3303: TRX_LINE_ID = p_sync_trx_lines_tbl.TRX_LINE_ID(i),
3304: TRX_WAYBILL_NUMBER = p_sync_trx_lines_tbl.TRX_WAYBILL_NUMBER(i),
3305: TRX_LINE_DESCRIPTION = p_sync_trx_lines_tbl.TRX_LINE_DESCRIPTION(i),

Line 3463: (c_application_id zx_lines_det_factors.application_id%TYPE,

3459: l_index BINARY_INTEGER;
3460: l_record_tax_lines VARCHAR2(1);
3461:
3462: CURSOR get_trx_date_csr
3463: (c_application_id zx_lines_det_factors.application_id%TYPE,
3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,
3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,
3467: c_event_id zx_lines_det_factors.event_id%TYPE

Line 3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,

3460: l_record_tax_lines VARCHAR2(1);
3461:
3462: CURSOR get_trx_date_csr
3463: (c_application_id zx_lines_det_factors.application_id%TYPE,
3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,
3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,
3467: c_event_id zx_lines_det_factors.event_id%TYPE
3468: ) IS

Line 3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,

3461:
3462: CURSOR get_trx_date_csr
3463: (c_application_id zx_lines_det_factors.application_id%TYPE,
3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,
3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,
3467: c_event_id zx_lines_det_factors.event_id%TYPE
3468: ) IS
3469: SELECT trx_date,

Line 3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,

3462: CURSOR get_trx_date_csr
3463: (c_application_id zx_lines_det_factors.application_id%TYPE,
3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,
3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,
3467: c_event_id zx_lines_det_factors.event_id%TYPE
3468: ) IS
3469: SELECT trx_date,
3470: related_doc_date,

Line 3467: c_event_id zx_lines_det_factors.event_id%TYPE

3463: (c_application_id zx_lines_det_factors.application_id%TYPE,
3464: c_entity_code zx_lines_det_factors.entity_code%TYPE,
3465: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
3466: c_trx_id zx_lines_det_factors.trx_id%TYPE,
3467: c_event_id zx_lines_det_factors.event_id%TYPE
3468: ) IS
3469: SELECT trx_date,
3470: related_doc_date,
3471: provnl_tax_determination_date

Line 3472: FROM zx_lines_det_factors

3468: ) IS
3469: SELECT trx_date,
3470: related_doc_date,
3471: provnl_tax_determination_date
3472: FROM zx_lines_det_factors
3473: WHERE application_id = c_application_id
3474: AND entity_code = c_entity_code
3475: AND event_class_code = c_event_class_code
3476: AND trx_id = c_trx_id

Line 3993: l_lines_det_rec zx_lines_det_factors%rowtype;

3989: l_return_status VARCHAR2(30);
3990: l_context_info_rec context_info_rec_type;
3991: l_init_msg_list VARCHAR2(1);
3992: l_upg_trx_info_rec ZX_ON_FLY_TRX_UPGRADE_PKG.zx_upg_trx_info_rec_type;
3993: l_lines_det_rec zx_lines_det_factors%rowtype;
3994:
3995: -- Added for bug#16483600 JAI ZX Integration
3996: lb_jai_exists BOOLEAN := FALSE;
3997:

Line 4110: | Update zx_lines_det_factors |

4106:
4107:
4108:
4109: /*------------------------------------------------+
4110: | Update zx_lines_det_factors |
4111: +------------------------------------------------*/
4112: IF l_event_class_rec.tax_event_type_code IN ('DELETE','PURGE') THEN
4113: -- Bug 5200373: Incarporated missing hook to take snapshot of zx_lines_det_factors so that
4114: -- upgraded R11i partner softwares can handle the header level document delete

Line 4113: -- Bug 5200373: Incarporated missing hook to take snapshot of zx_lines_det_factors so that

4109: /*------------------------------------------------+
4110: | Update zx_lines_det_factors |
4111: +------------------------------------------------*/
4112: IF l_event_class_rec.tax_event_type_code IN ('DELETE','PURGE') THEN
4113: -- Bug 5200373: Incarporated missing hook to take snapshot of zx_lines_det_factors so that
4114: -- upgraded R11i partner softwares can handle the header level document delete
4115: -- sceanrio.
4116: zx_r11i_tax_partner_pkg.copy_trx_line_for_ptnr_bef_upd(NULL
4117: , l_event_class_rec

Line 4141: FROM ZX_LINES_DET_FACTORS

4137: BEGIN
4138: /*Lock trx line det factors for delete*/
4139: SELECT *
4140: INTO l_lines_det_rec
4141: FROM ZX_LINES_DET_FACTORS
4142: WHERE application_id = p_transaction_rec.application_id
4143: AND entity_code = p_transaction_rec.entity_code
4144: AND event_class_code = p_transaction_rec.event_class_code
4145: AND trx_id = p_transaction_rec.trx_id

Line 4168: DELETE from ZX_LINES_DET_FACTORS

4164: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4165: END IF;
4166: END;
4167:
4168: DELETE from ZX_LINES_DET_FACTORS
4169: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID
4170: AND ENTITY_CODE = p_transaction_rec.ENTITY_CODE
4171: AND EVENT_CLASS_CODE = p_transaction_rec.EVENT_CLASS_CODE
4172: AND TRX_ID = p_transaction_rec.TRX_ID;

Line 4175: UPDATE ZX_LINES_DET_FACTORS

4171: AND EVENT_CLASS_CODE = p_transaction_rec.EVENT_CLASS_CODE
4172: AND TRX_ID = p_transaction_rec.TRX_ID;
4173:
4174: ELSIF l_event_class_rec.tax_event_type_code NOT IN ('RELEASE_HOLD') THEN
4175: UPDATE ZX_LINES_DET_FACTORS
4176: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
4177: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
4178: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
4179: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 4203: UPDATE ZX_LINES_DET_FACTORS

4199: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
4200: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
4201: END IF;
4202: END IF;
4203: UPDATE ZX_LINES_DET_FACTORS
4204: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
4205: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
4206: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
4207: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 4428: UPDATE ZX_LINES_DET_FACTORS

4424: END;
4425: END IF;
4426:
4427: BEGIN
4428: UPDATE ZX_LINES_DET_FACTORS
4429: SET LINE_LEVEL_ACTION = 'DELETE',
4430: EVENT_TYPE_CODE = nvl(p_transaction_line_rec.event_type_code, l_event_type_code),
4431: TAX_EVENT_TYPE_CODE = 'UPDATE'
4432: WHERE application_id = p_transaction_line_rec.application_id

Line 4582: select ZX_LINES_DET_FACTORS_S.nextval

4578:
4579: /*-----------------------------------------+
4580: | Get the event id for the whole document |
4581: +-----------------------------------------*/
4582: select ZX_LINES_DET_FACTORS_S.nextval
4583: into l_event_class_rec.event_id
4584: from dual;
4585:
4586: /*------------------------------------------------------+

Line 4913: select zx_lines_det_factors_s.nextval

4909:
4910: /*-----------------------------------------+
4911: | Get the event id for the whole document |
4912: +-----------------------------------------*/
4913: select zx_lines_det_factors_s.nextval
4914: into l_event_class_rec.event_id
4915: from dual;
4916:
4917: /*------------------------------------------------------+

Line 5262: --select ZX_LINES_DET_FACTORS_S.nextval

5258: /*-----------------------------------------+
5259: | Get the event id for the whole document |
5260: +-----------------------------------------*/
5261: --Bug 7650433
5262: --select ZX_LINES_DET_FACTORS_S.nextval
5263: --into l_event_id
5264: --from dual;
5265:
5266: /*------------------------------------------------+

Line 5267: | Update zx_lines_det_factors |

5263: --into l_event_id
5264: --from dual;
5265:
5266: /*------------------------------------------------+
5267: | Update zx_lines_det_factors |
5268: +------------------------------------------------*/
5269:
5270: --FOR c_rec in c_event_info loop
5271: -- IF c_rec.quote_flag <> 'Y' THEN -- Bug 5646787

Line 5273: -- UPDATE ZX_LINES_DET_FACTORS D

5269:
5270: --FOR c_rec in c_event_info loop
5271: -- IF c_rec.quote_flag <> 'Y' THEN -- Bug 5646787
5272: --
5273: -- UPDATE ZX_LINES_DET_FACTORS D
5274: -- SET EVENT_ID = c_rec.EVENT_ID,
5275: -- EVENT_TYPE_CODE = c_rec.EVENT_TYPE_CODE,
5276: -- TAX_EVENT_TYPE_CODE = c_rec.TAX_EVENT_TYPE_CODE,
5277: -- DOC_EVENT_STATUS = c_rec.DOC_EVENT_STATUS

Line 5325: select ZX_LINES_DET_FACTORS_S.nextval

5321: +-----------------------------------------*/
5322: FOR i IN 1..nvl(l_evnt_cls.event_class_code.LAST,0)
5323: LOOP
5324: --Bug 7650433
5325: select ZX_LINES_DET_FACTORS_S.nextval
5326: into l_event_id
5327: from dual;
5328:
5329: -- Changed code to bulk collection for Bug#14613482 --

Line 5348: UPDATE ZX_LINES_DET_FACTORS D

5344:
5345: -- Added if-else condition for Bug#16341635 --
5346: IF l_evnt_cls.application_id(i) = 201 THEN
5347: FORALL i IN NVL(l_trx_id_tbl.FIRST,0)..NVL(l_trx_id_tbl.LAST,-99)
5348: UPDATE ZX_LINES_DET_FACTORS D
5349: SET EVENT_ID = l_event_id_tbl(i),
5350: EVENT_TYPE_CODE = l_event_type_code_tbl(i),
5351: TAX_EVENT_TYPE_CODE = l_tax_event_type_code_tbl(i),
5352: DOC_EVENT_STATUS = l_doc_event_status_tbl(i)

Line 5366: UPDATE ZX_LINES_DET_FACTORS D

5362: AND TL.EVENT_CLASS_CODE = l_event_class_code_tbl(i)
5363: AND TL.TRX_ID = l_trx_id_tbl(i));
5364: ELSE
5365: FORALL i IN NVL(l_trx_id_tbl.FIRST,0)..NVL(l_trx_id_tbl.LAST,-99)
5366: UPDATE ZX_LINES_DET_FACTORS D
5367: SET EVENT_ID = l_event_id_tbl(i),
5368: EVENT_TYPE_CODE = l_event_type_code_tbl(i),
5369: TAX_EVENT_TYPE_CODE = l_tax_event_type_code_tbl(i),
5370: DOC_EVENT_STATUS = l_doc_event_status_tbl(i)

Line 5557: FROM ZX_LINES_DET_FACTORS

5553: l_related_doc_date,
5554: l_adjusted_doc_date,
5555: l_trx_date,
5556: l_prov_tax_det_date
5557: FROM ZX_LINES_DET_FACTORS
5558: WHERE application_id = l_event_class_rec.application_id
5559: AND entity_code = l_event_class_rec.entity_code
5560: AND event_class_code = l_event_class_rec.event_class_code
5561: AND trx_id = l_event_class_rec.trx_id

Line 5798: | Update zx_lines_det_factors |

5794:
5795: END LOOP;--event_classes cursor
5796:
5797: /*------------------------------------------------+
5798: | Update zx_lines_det_factors |
5799: +------------------------------------------------*/
5800:
5801: IF zx_global_structures_pkg.g_event_class_rec.quote_flag <> 'Y' OR
5802: zx_global_structures_pkg.g_event_class_rec.ICX_SESSION_ID is not null

Line 5828: DELETE from zx_lines_det_factors

5824: | Bug 4948674: Handle delete for P2P products when icx_session_id is NOT NULL |
5825: +------------------------------------------------------------------------------*/
5826:
5827: FORALL i IN l_application_id_tbl.FIRST .. l_application_id_tbl.LAST
5828: DELETE from zx_lines_det_factors
5829: WHERE APPLICATION_ID = l_application_id_tbl(i)
5830: AND ENTITY_CODE = l_entity_code_tbl(i)
5831: AND EVENT_CLASS_CODE = l_event_class_code_tbl(i)
5832: AND TRX_ID = l_trx_id_tbl(i)

Line 6421: select ZX_LINES_DET_FACTORS_S.nextval

6417:
6418: /*-----------------------------------------+
6419: | Get the event id for the whole document |
6420: +-----------------------------------------*/
6421: select ZX_LINES_DET_FACTORS_S.nextval
6422: into l_event_class_rec.event_id
6423: from dual;
6424:
6425: /*------------------------------------------------+

Line 6426: | Update zx_lines_det_factors |

6422: into l_event_class_rec.event_id
6423: from dual;
6424:
6425: /*------------------------------------------------+
6426: | Update zx_lines_det_factors |
6427: +------------------------------------------------*/
6428:
6429: UPDATE ZX_LINES_DET_FACTORS
6430: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,

Line 6429: UPDATE ZX_LINES_DET_FACTORS

6425: /*------------------------------------------------+
6426: | Update zx_lines_det_factors |
6427: +------------------------------------------------*/
6428:
6429: UPDATE ZX_LINES_DET_FACTORS
6430: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
6431: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
6432: EVENT_ID = l_event_class_rec.event_id,
6433: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code

Line 7159: FROM ZX_LINES_DET_FACTORS

7155: | Retrieve the ledger id to pass to TDS process |
7156: +------------------------------------------------*/
7157: SELECT ledger_id
7158: INTO l_ledger_id
7159: FROM ZX_LINES_DET_FACTORS
7160: WHERE application_id = p_transaction_rec.application_id
7161: AND entity_code = p_transaction_rec.entity_code
7162: AND event_class_code = p_transaction_rec.event_class_code
7163: AND trx_id = p_transaction_rec.trx_id

Line 7188: | Update zx_lines_det_factors for currency info |

7184: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7185: END IF;
7186: END IF;
7187: /*------------------------------------------------+
7188: | Update zx_lines_det_factors for currency info |
7189: +------------------------------------------------*/
7190: UPDATE ZX_LINES_DET_FACTORS SET
7191: CURRENCY_CONVERSION_DATE = p_curr_conv_date,
7192: CURRENCY_CONVERSION_RATE = p_curr_conv_rate,

Line 7190: UPDATE ZX_LINES_DET_FACTORS SET

7186: END IF;
7187: /*------------------------------------------------+
7188: | Update zx_lines_det_factors for currency info |
7189: +------------------------------------------------*/
7190: UPDATE ZX_LINES_DET_FACTORS SET
7191: CURRENCY_CONVERSION_DATE = p_curr_conv_date,
7192: CURRENCY_CONVERSION_RATE = p_curr_conv_rate,
7193: CURRENCY_CONVERSION_TYPE = p_curr_conv_type
7194: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 7633: | Update zx_lines_det_factors |

7629: END IF;
7630: END IF;
7631:
7632: /*------------------------------------------------+
7633: | Update zx_lines_det_factors |
7634: +------------------------------------------------*/
7635: UPDATE ZX_LINES_DET_FACTORS
7636: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
7637: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code

Line 7635: UPDATE ZX_LINES_DET_FACTORS

7631:
7632: /*------------------------------------------------+
7633: | Update zx_lines_det_factors |
7634: +------------------------------------------------*/
7635: UPDATE ZX_LINES_DET_FACTORS
7636: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
7637: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
7638: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID
7639: AND ENTITY_CODE = p_transaction_rec.ENTITY_CODE

Line 7823: UPDATE ZX_LINES_DET_FACTORS

7819: LIMIT G_LINES_PER_FETCH;
7820:
7821:
7822: FORALL i IN l_application_id_tbl.FIRST .. l_application_id_tbl.LAST
7823: UPDATE ZX_LINES_DET_FACTORS
7824: SET EVENT_TYPE_CODE = l_event_type_code_tbl(i),
7825: TAX_EVENT_TYPE_CODE = l_tax_event_type_code_tbl(i),
7826: DOC_EVENT_STATUS = l_doc_event_status_tbl(i)
7827: WHERE

Line 9729: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

9725: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_LINE_DET_FACTORS';
9726: l_api_version CONSTANT NUMBER := 1.0;
9727: l_return_status VARCHAR2(1);
9728: l_event_class_rec event_class_rec_type;
9729: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
9730: l_line_exists NUMBER;
9731: l_record_exists BOOLEAN;
9732: l_init_msg_list VARCHAR2(1);
9733: l_tax_classification_code VARCHAR2(50);

Line 9859: SELECT ZX_LINES_DET_FACTORS_S.nextval

9855: --Bugfix 4486946 - on-the-fly upgrade end
9856: END IF; --event_type_code
9857:
9858: IF NOT(l_record_exists) THEN
9859: SELECT ZX_LINES_DET_FACTORS_S.nextval
9860: INTO l_event_class_rec.event_id
9861: FROM dual;
9862: END IF;
9863:

Line 9929: of the tax determining factors from ZX_LINES_DET_FACTORS for the duplicate source document line.*/

9925: l_do_defaulting := ZX_SRVC_TYP_PKG.decide_call_redefault_APIs (p_trx_line_index => 1);
9926:
9927: IF l_do_defaulting THEN
9928: /*If the Duplicate Source Document Line identifiers are passed, then derive the values
9929: of the tax determining factors from ZX_LINES_DET_FACTORS for the duplicate source document line.*/
9930: IF p_duplicate_line_rec.application_id is not null THEN
9931: --Default determining factors from Duplicated Line
9932: SELECT
9933: default_taxation_country,

Line 9955: FROM ZX_LINES_DET_FACTORS

9951: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_category(1),
9952: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.assessable_value(1),
9953: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_type(1),
9954: l_tax_classification_code
9955: FROM ZX_LINES_DET_FACTORS
9956: WHERE application_id = p_duplicate_line_rec.application_id
9957: AND entity_code = p_duplicate_line_rec.entity_code
9958: AND event_class_code = p_duplicate_line_rec.event_class_code
9959: AND trx_id = p_duplicate_line_rec.trx_id

Line 9972: ZX_LINES_DET_FACTORS or call TDS defaulting API*/

9968: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.output_tax_classification_code(1) := l_tax_classification_code;
9969: END IF;
9970: /*If the applied from, adjusted, source document information is passed with
9971: the transaction line, then derive the values tax determining factors from
9972: ZX_LINES_DET_FACTORS or call TDS defaulting API*/
9973: ELSE ZX_SRVC_TYP_PKG.default_tax_attrs_wrapper (p_trx_line_index => 1,
9974: p_event_class_rec => l_event_class_rec,
9975: x_return_status => l_return_status
9976: );

Line 10086: | determining attributes into zx_lines_det_factors after complying with the |

10082:
10083: /* ============================================================================*
10084: | PROCEDURE insert_line_det_factors : This overloaded procedure will be called|
10085: | by iProcurement to insert all the transaction lines with defaulted tax |
10086: | determining attributes into zx_lines_det_factors after complying with the |
10087: | validation process |
10088: * ============================================================================*/
10089: PROCEDURE insert_line_det_factors (
10090: p_api_version IN NUMBER,

Line 10102: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

10098: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_LINE_DET_FACTORS';
10099: l_api_version CONSTANT NUMBER := 1.0;
10100: l_return_status VARCHAR2(1);
10101: l_event_class_rec event_class_rec_type;
10102: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
10103: l_line_exists NUMBER;
10104: l_record_exists BOOLEAN;
10105: l_init_msg_list VARCHAR2(1);
10106: l_upg_trx_info_rec ZX_ON_FLY_TRX_UPGRADE_PKG.zx_upg_trx_info_rec_type;

Line 10232: SELECT ZX_LINES_DET_FACTORS_S.nextval

10228: | line, the event id needs to be generated from the sequence only for the first transaction|
10229: | line. For other lines, we need to retrieve the event id from the table. |
10230: +-----------------------------------------------------------------------------------------*/
10231: IF NOT(l_record_exists) THEN
10232: SELECT ZX_LINES_DET_FACTORS_S.nextval
10233: INTO l_event_class_rec.event_id
10234: FROM dual;
10235: END IF;
10236:

Line 10635: FROM zx_lines_det_factors

10631: l_incomplete_scenario := 0;
10632: BEGIN
10633: SELECT 1
10634: INTO l_incomplete_scenario
10635: FROM zx_lines_det_factors
10636: WHERE event_class_code = p_hdr_det_factors_rec.event_class_code
10637: AND application_id = p_hdr_det_factors_rec.application_id
10638: AND entity_code = p_hdr_det_factors_rec.entity_code
10639: AND trx_id = p_hdr_det_factors_rec.trx_id

Line 10671: UPDATE ZX_LINES_DET_FACTORS

10667: ' Incorrect event information passed in for event type :' ||p_hdr_det_factors_rec.event_type_code ||' Please Check!');
10668: END IF;
10669: END;
10670: BEGIN
10671: UPDATE ZX_LINES_DET_FACTORS
10672: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
10673: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
10674: WHERE APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID
10675: AND ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE

Line 11411: UPDATE ZX_LINES_DET_FACTORS SET

11407:
11408: /*-----------------------------------------------+
11409: |Update the headers only in zx_line_det_factors |
11410: +----------------------------------------------*/
11411: UPDATE ZX_LINES_DET_FACTORS SET
11412: APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID,
11413: ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE,
11414: EVENT_CLASS_CODE = p_hdr_det_factors_rec.EVENT_CLASS_CODE,
11415: EVENT_TYPE_CODE = p_hdr_det_factors_rec.EVENT_TYPE_CODE,

Line 11755: UPDATE ZX_LINES_DET_FACTORS SET

11751:
11752: /*-----------------------------------------------+
11753: |Update the headers only in zx_line_det_factors |
11754: +----------------------------------------------*/
11755: UPDATE ZX_LINES_DET_FACTORS SET
11756: APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID,
11757: ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE,
11758: EVENT_CLASS_CODE = p_hdr_det_factors_rec.EVENT_CLASS_CODE,
11759: EVENT_TYPE_CODE = p_hdr_det_factors_rec.EVENT_TYPE_CODE,

Line 12253: FROM ZX_LINES_DET_FACTORS

12249: SELECT event_id,
12250: nvl(user_upd_det_factors_flag,'N')
12251: INTO l_event_class_rec.event_id,
12252: l_user_updated_flag
12253: FROM ZX_LINES_DET_FACTORS
12254: WHERE application_id = l_event_class_rec.application_id
12255: AND entity_code = l_event_class_rec.entity_code
12256: AND event_class_code = l_event_class_rec.event_class_code
12257: AND trx_id = l_event_class_rec.trx_id

Line 12286: FROM ZX_LINES_DET_FACTORS

12282: SELECT event_id,
12283: nvl(user_upd_det_factors_flag,'N')
12284: INTO l_event_class_rec.event_id,
12285: l_user_updated_flag
12286: FROM ZX_LINES_DET_FACTORS
12287: WHERE application_id = l_event_class_rec.application_id
12288: AND entity_code = l_event_class_rec.entity_code
12289: AND event_class_code = l_event_class_rec.event_class_code
12290: AND trx_id = l_event_class_rec.trx_id

Line 12461: | by iProcurement to insert all the transaction lines into zx_lines_det_factors|

12457: END update_line_det_factors;
12458:
12459: /* ============================================================================*
12460: | PROCEDURE copy_insert_line_det_factors : This procedure will be called |
12461: | by iProcurement to insert all the transaction lines into zx_lines_det_factors|
12462: | after copying the tax determining attributes from the source document |
12463: | information passed in. All lines thus inserted will be flagged to be picked |
12464: | up by the tax calculation process |
12465: * ============================================================================*/

Line 12480: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

12476: l_api_name CONSTANT VARCHAR2(30) := 'COPY_INSERT_LINE_DET_FACTORS';
12477: l_api_version CONSTANT NUMBER := 1.0;
12478: l_return_status VARCHAR2(1);
12479: l_event_class_rec event_class_rec_type;
12480: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
12481: l_line_exists NUMBER;
12482: l_record_exists BOOLEAN;
12483: l_init_msg_list VARCHAR2(1);
12484: l_tax_classification_code VARCHAR2(50);

Line 12579: SELECT zx_lines_det_factors_s.nextval

12575: END LOOP;
12576:
12577:
12578: IF NOT(l_record_exists) THEN
12579: SELECT zx_lines_det_factors_s.nextval
12580: INTO l_event_class_rec.event_id
12581: FROM dual;
12582: END IF;
12583:

Line 12637: of the tax determining factors from ZX_LINES_DET_FACTORS for the source document line.*/

12633: /* =============================================*
12634: |Default the tax determining attributes |
12635: * ============================================*/
12636: /*If the Source Document Line identifiers are passed, then derive the values
12637: of the tax determining factors from ZX_LINES_DET_FACTORS for the source document line.*/
12638: FOR i in 1 .. nvl(ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.application_id.LAST,-99)
12639: LOOP
12640: SELECT
12641: default_taxation_country,

Line 12665: FROM ZX_LINES_DET_FACTORS

12661: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.assessable_value(i),
12662: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_type(i),
12663: l_tax_classification_code,
12664: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.user_upd_det_factors_flag(i)
12665: FROM ZX_LINES_DET_FACTORS
12666: WHERE application_id = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_application_id(i)
12667: AND entity_code = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_entity_code(i)
12668: AND event_class_code = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_event_class_code(i)
12669: AND trx_id = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_trx_id(i)

Line 13048: DELETE from ZX_LINES_DET_FACTORS

13044: /*-----------------------------------------+
13045: | Delete transaction line |
13046: +-----------------------------------------*/
13047:
13048: DELETE from ZX_LINES_DET_FACTORS
13049: WHERE application_id = p_transaction_line_rec.application_id
13050: AND entity_code = p_transaction_line_rec.entity_code
13051: AND event_class_code = p_transaction_line_rec.event_class_code
13052: AND trx_id = p_transaction_line_rec.trx_id

Line 13315: -- Fetch all attributes from zx_lines_det_factors

13311: -- For records in trx_line_dist_tbl
13312: -- Loop
13313: -- If line_level_action is UPDATE
13314: -- If all tax determining attributes are passed null
13315: -- Fetch all attributes from zx_lines_det_factors
13316: -- if item/item_org_id/country has changed
13317: -- call RE-defaulting API for intended_use, product_fiscal_classification
13318: -- if item/item_org_id/assessable value has changed
13319: -- call redefaulting API for assessable value

Line 14694: FROM ZX_LINES_DET_FACTORS lines

14690: END IF;
14691: END IF; --tax recovery is Y
14692:
14693: DELETE
14694: FROM ZX_LINES_DET_FACTORS lines
14695: WHERE (APPLICATION_ID, ENTITY_CODE,EVENT_CLASS_CODE, TRX_ID)
14696: IN (SELECT /*+ INDEX (ZX_PURGE_TRANSACTIONS_GT ZX_PURGE_TRANSACTIONS_GT_U1)*/
14697: APPLICATION_ID,
14698: ENTITY_CODE,

Line 14707: 'Number of rows deleted from ZX_LINES_DET_FACTORS = '||to_char(l_row_count));

14703: IF SQL%FOUND THEN
14704: l_row_count := SQL%ROWCOUNT;
14705: IF (G_LEVEL_PROCEDURE >= g_current_runtime_level ) THEN
14706: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name ,
14707: 'Number of rows deleted from ZX_LINES_DET_FACTORS = '||to_char(l_row_count));
14708: END IF;
14709: END IF;
14710: --ELSIF tax_reporting_flag = 'Y' --AR/AP cases wherein we need to purge only if tax lines are frozen --TBD on requirement basis
14711: END IF; --tax reporting flag is N

Line 15160: update zx_lines_det_factors

15156: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name,
15157: 'Number of Rows updated in zx_lines: '||SQL%ROWCOUNT);
15158: END IF;
15159:
15160: update zx_lines_det_factors
15161: set adjusted_doc_application_id = null,
15162: adjusted_doc_entity_code = null,
15163: adjusted_doc_event_class_code = null,
15164: adjusted_doc_trx_id = null,

Line 15176: 'Number of Rows updated in zx_lines_det_factors: '||SQL%ROWCOUNT);

15172: and trx_id = p_trx_id;
15173:
15174: IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
15175: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name,
15176: 'Number of Rows updated in zx_lines_det_factors: '||SQL%ROWCOUNT);
15177: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN','ZX_API_PUB: '||l_api_name||'()-');
15178: END IF;
15179: EXCEPTION
15180: WHEN FND_API.G_EXC_ERROR THEN