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: ZX_GLOBAL_STRUCTURES_PKG.g_registration_info_tbl.DELETE;
887: /*-----------------------------------------+
888: | Get the event id for the whole document |
889: +-----------------------------------------*/
890: select ZX_LINES_DET_FACTORS_S.nextval
891: into l_event_id
892: from dual;
893:
894: OPEN event_classes;

Line 1062: MERGE INTO ZX_LINES_DET_FACTORS lines_dt

1058: END IF;
1059: */
1060:
1061: IF zx_global_structures_pkg.g_event_class_rec.prod_family_grp_code = 'P2P' THEN
1062: MERGE INTO ZX_LINES_DET_FACTORS lines_dt
1063: USING (SELECT
1064: application_id,
1065: entity_code,
1066: event_class_code,

Line 1187: DELETE FROM zx_lines_det_factors

1183:
1184:
1185: FORALL i IN l_trx_id_tbl.FIRST .. l_trx_id_tbl.LAST
1186: */
1187: DELETE FROM zx_lines_det_factors
1188: WHERE (APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID)
1189: IN (SELECT /*+ cardinality (ZX_TRX_HEADERS_GT 1) */ APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID
1190: FROM ZX_TRX_HEADERS_GT);
1191:

Line 1239: DELETE from zx_lines_det_factors

1235: LIMIT G_LINES_PER_FETCH;
1236:
1237: FORALL i IN l_trx_id_tbl.FIRST .. l_trx_id_tbl.LAST
1238:
1239: DELETE from zx_lines_det_factors
1240: WHERE APPLICATION_ID = l_application_id_tbl(i)
1241: AND ENTITY_CODE = l_entity_code_tbl(i)
1242: AND EVENT_CLASS_CODE = l_event_class_code_tbl(i)
1243: AND TRX_ID = l_trx_id_tbl(i)

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

1243: AND TRX_ID = l_trx_id_tbl(i)
1244: AND line_level_action ='DELETE';
1245:
1246: */
1247: DELETE /*+ ORDERED USE_NL_WITH_INDEX (Z,ZX_LINES_DET_FACTORS_U1) */ FROM zx_lines_det_factors Z
1248: WHERE (Z.APPLICATION_ID, Z.ENTITY_CODE, Z.EVENT_CLASS_CODE, Z.TRX_ID)
1249: IN (SELECT /*+ unnest cardinality (ZX_TRX_HEADERS_GT 1) */
1250: APPLICATION_ID, ENTITY_CODE, EVENT_CLASS_CODE, TRX_ID
1251: FROM ZX_TRX_HEADERS_GT)

Line 1288: UPDATE zx_lines_det_factors

1284: -- Bug Fix for 5155481 - Commented out the following update. Reporting flag is set during the
1285: -- insert itself based on the record_flag.
1286:
1287: /* IF l_event_class_rec.QUOTE_FLAG = 'Y' THEN
1288: UPDATE zx_lines_det_factors
1289: SET tax_reporting_flag ='N'
1290: WHERE application_id = l_event_class_rec.application_id
1291: AND entity_code = l_event_class_rec.entity_code
1292: AND event_class_code = l_event_class_rec.event_class_code

Line 1317: FROM ZX_LINES_DET_FACTORS lines

1313: +--------------------------------------------------------*/
1314: BEGIN
1315: UPDATE ZX_TRX_HEADERS_GT headers
1316: SET doc_level_recalc_flag = (SELECT distinct(lines.threshold_indicator_flag)
1317: FROM ZX_LINES_DET_FACTORS lines
1318: WHERE lines.application_id = headers.application_id
1319: AND lines.event_class_code = headers.event_class_code
1320: AND lines.entity_code = headers.entity_code
1321: AND lines.trx_id = headers.trx_id

Line 1491: select ZX_LINES_DET_FACTORS_S.nextval

1487: | Copy to Event Class Record |
1488: +------------------------------------------------------*/
1489:
1490: /*Fetch the event id for the document*/
1491: select ZX_LINES_DET_FACTORS_S.nextval
1492: into l_event_class_rec.event_id
1493: from dual;
1494:
1495: /*Populate the event class record structure*/

Line 1568: FROM ZX_LINES_DET_FACTORS

1564: l_event_class_rec.RDNG_SHIP_TO_PTY_TX_P_ST_ID,
1565: l_event_class_rec.RDNG_SHIP_FROM_PTY_TX_P_ST_ID,
1566: l_event_class_rec.RDNG_BILL_TO_PTY_TX_P_ST_ID,
1567: l_event_class_rec.RDNG_BILL_FROM_PTY_TX_P_ST_ID
1568: FROM ZX_LINES_DET_FACTORS
1569: WHERE application_id = p_transaction_rec.application_id
1570: AND entity_code = p_transaction_rec.entity_code
1571: AND event_class_code = p_transaction_rec.event_class_code
1572: AND trx_id = p_transaction_rec.trx_id

Line 1609: DELETE from zx_lines_det_factors

1605: -- un-deleted data in the Det Factors table for the previousc all. So, we need to clean it up first before
1606: -- starting to process the input lines of the new call.We should at first always attempt to remove any rows
1607: --sitting in Det Factors table for that icx session
1608: /* IF l_event_class_rec.ICX_SESSION_ID is not null THEN
1609: DELETE from zx_lines_det_factors
1610: WHERE application_id = l_event_class_rec.application_id and
1611: entity_code = l_event_class_rec.entity_code and
1612: event_class_code = l_event_class_rec.event_class_code and
1613: trx_id = l_event_class_rec.trx_id;

Line 1853: MERGE INTO ZX_LINES_DET_FACTORS lines_dt

1849: END IF;
1850: */
1851:
1852: IF zx_global_structures_pkg.g_event_class_rec.prod_family_grp_code = 'P2P' THEN
1853: MERGE INTO ZX_LINES_DET_FACTORS lines_dt
1854: USING (SELECT
1855: application_id,
1856: entity_code,
1857: event_class_code,

Line 1955: FROM ZX_LINES_DET_FACTORS

1951: +--------------------------------------------------------*/
1952: BEGIN
1953: SELECT threshold_indicator_flag
1954: INTO x_doc_level_recalc_flag
1955: FROM ZX_LINES_DET_FACTORS
1956: WHERE application_id = l_event_class_rec.application_id
1957: AND event_class_code = l_event_class_rec.event_class_code
1958: AND entity_code = l_event_class_rec.entity_code
1959: AND trx_id = l_event_class_rec.trx_id

Line 1978: DELETE from zx_lines_det_factors

1974: l_event_class_rec.quote_flag = 'Y' and
1975: l_event_class_rec.intgrtn_det_factors_ui_flag = 'N' and
1976: l_event_class_rec.icx_session_id is null) THEN
1977: --Delete lines for transaction header which need not be recorded
1978: DELETE from zx_lines_det_factors
1979: WHERE application_id = l_event_class_rec.application_id
1980: AND entity_code = l_event_class_rec.entity_code
1981: AND event_class_code = l_event_class_rec.event_class_code
1982: AND trx_id = l_event_class_rec.trx_id;

Line 1991: UPDATE zx_lines_det_factors

1987: -- Bug Fix for 5155481 - Commented out the following update. Reporting flag is set during the
1988: -- insert itself based on the record_flag.
1989:
1990: /* IF l_event_class_rec.QUOTE_FLAG = 'Y' THEN
1991: UPDATE zx_lines_det_factors
1992: SET tax_reporting_flag ='N'
1993: WHERE application_id = l_event_class_rec.application_id
1994: AND entity_code = l_event_class_rec.entity_code
1995: AND event_class_code = l_event_class_rec.event_class_code

Line 2004: DELETE FROM ZX_LINES_DET_FACTORS

2000:
2001: /*-----------------------------------------------------+
2002: | Handle delete for mark tax lines deleted |
2003: +-----------------------------------------------------*/
2004: DELETE FROM ZX_LINES_DET_FACTORS
2005: WHERE line_level_action ='DELETE'
2006: AND application_id = l_event_class_rec.application_id
2007: AND entity_code = l_event_class_rec.entity_code
2008: AND event_class_code = l_event_class_rec.event_class_code

Line 2016: DELETE from zx_lines_det_factors

2012: | Bug 4948674: Handle delete for O2C products when icx_session_id is NOT NULL |
2013: +------------------------------------------------------------------------------*/
2014: IF l_event_class_rec.ICX_SESSION_ID is not null AND
2015: l_event_class_rec.PROD_FAMILY_GRP_CODE = 'O2C' THEN
2016: DELETE from zx_lines_det_factors
2017: WHERE application_id = l_event_class_rec.application_id and
2018: entity_code = l_event_class_rec.entity_code and
2019: event_class_code = l_event_class_rec.event_class_code and
2020: trx_id = l_event_class_rec.trx_id and

Line 2227: select zx_lines_det_factors_s.nextval

2223:
2224: /*-----------------------------------------+
2225: | Get the event id for the whole document |
2226: +-----------------------------------------*/
2227: select zx_lines_det_factors_s.nextval
2228: into l_event_id
2229: from dual;
2230:
2231: OPEN event_classes;

Line 2648: | Update zx_lines_det_factors |

2644: NULL;
2645: END;
2646:
2647: /*--------------------------------------------------+
2648: | Update zx_lines_det_factors |
2649: +--------------------------------------------------*/
2650: /*Retrieve the sequence id since it has to be same for all updated rows*/
2651: select ZX_LINES_DET_FACTORS_S.nextval
2652: INTO l_event_class_rec.event_id

Line 2651: select ZX_LINES_DET_FACTORS_S.nextval

2647: /*--------------------------------------------------+
2648: | Update zx_lines_det_factors |
2649: +--------------------------------------------------*/
2650: /*Retrieve the sequence id since it has to be same for all updated rows*/
2651: select ZX_LINES_DET_FACTORS_S.nextval
2652: INTO l_event_class_rec.event_id
2653: FROM dual;
2654:
2655: IF ( G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN

Line 2699: UPDATE ZX_LINES_DET_FACTORS SET

2695: END LOOP;
2696: END IF;
2697:
2698: /* update the header level attributes*/
2699: UPDATE ZX_LINES_DET_FACTORS SET
2700: EVENT_ID = l_event_class_rec.event_id,
2701: --EVENT_TYPE_CODE = p_sync_trx_rec.EVENT_TYPE_CODE, /*bug 3922983*/
2702: TRX_NUMBER = p_sync_trx_rec.TRX_NUMBER,
2703: TRX_DESCRIPTION = p_sync_trx_rec.TRX_DESCRIPTION,

Line 2751: UPDATE ZX_LINES_DET_FACTORS SET

2747: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2748: END IF;
2749: END IF;
2750: /* update the header level attributes*/
2751: UPDATE ZX_LINES_DET_FACTORS SET
2752: EVENT_ID = l_event_class_rec.event_id,
2753: --EVENT_TYPE_CODE = p_sync_trx_rec.EVENT_TYPE_CODE, /*bug 3922983*/
2754: TRX_NUMBER = p_sync_trx_rec.TRX_NUMBER,
2755: TRX_DESCRIPTION = p_sync_trx_rec.TRX_DESCRIPTION,

Line 2789: UPDATE ZX_LINES_DET_FACTORS SET

2785:
2786: /* update the line level attributes if passed*/
2787: IF (p_sync_trx_lines_tbl.APPLICATION_ID.EXISTS(1)) THEN
2788: FORALL i IN 1..nvl(p_sync_trx_lines_tbl.APPLICATION_ID.LAST,-99)
2789: UPDATE ZX_LINES_DET_FACTORS SET
2790: TRX_LEVEL_TYPE = p_sync_trx_lines_tbl.TRX_LEVEL_TYPE(i),
2791: TRX_LINE_ID = p_sync_trx_lines_tbl.TRX_LINE_ID(i),
2792: TRX_WAYBILL_NUMBER = p_sync_trx_lines_tbl.TRX_WAYBILL_NUMBER(i),
2793: TRX_LINE_DESCRIPTION = p_sync_trx_lines_tbl.TRX_LINE_DESCRIPTION(i),

Line 2914: (c_application_id zx_lines_det_factors.application_id%TYPE,

2910: l_index BINARY_INTEGER;
2911: l_record_tax_lines VARCHAR2(1);
2912:
2913: CURSOR get_trx_date_csr
2914: (c_application_id zx_lines_det_factors.application_id%TYPE,
2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,
2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,
2918: c_event_id zx_lines_det_factors.event_id%TYPE

Line 2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,

2911: l_record_tax_lines VARCHAR2(1);
2912:
2913: CURSOR get_trx_date_csr
2914: (c_application_id zx_lines_det_factors.application_id%TYPE,
2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,
2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,
2918: c_event_id zx_lines_det_factors.event_id%TYPE
2919: ) IS

Line 2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,

2912:
2913: CURSOR get_trx_date_csr
2914: (c_application_id zx_lines_det_factors.application_id%TYPE,
2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,
2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,
2918: c_event_id zx_lines_det_factors.event_id%TYPE
2919: ) IS
2920: SELECT trx_date,

Line 2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,

2913: CURSOR get_trx_date_csr
2914: (c_application_id zx_lines_det_factors.application_id%TYPE,
2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,
2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,
2918: c_event_id zx_lines_det_factors.event_id%TYPE
2919: ) IS
2920: SELECT trx_date,
2921: related_doc_date,

Line 2918: c_event_id zx_lines_det_factors.event_id%TYPE

2914: (c_application_id zx_lines_det_factors.application_id%TYPE,
2915: c_entity_code zx_lines_det_factors.entity_code%TYPE,
2916: c_event_class_code zx_lines_det_factors.event_class_code%TYPE,
2917: c_trx_id zx_lines_det_factors.trx_id%TYPE,
2918: c_event_id zx_lines_det_factors.event_id%TYPE
2919: ) IS
2920: SELECT trx_date,
2921: related_doc_date,
2922: provnl_tax_determination_date

Line 2923: FROM zx_lines_det_factors

2919: ) IS
2920: SELECT trx_date,
2921: related_doc_date,
2922: provnl_tax_determination_date
2923: FROM zx_lines_det_factors
2924: WHERE application_id = c_application_id
2925: AND entity_code = c_entity_code
2926: AND event_class_code = c_event_class_code
2927: AND trx_id = c_trx_id

Line 3395: l_lines_det_rec zx_lines_det_factors%rowtype;

3391: l_return_status VARCHAR2(30);
3392: l_context_info_rec context_info_rec_type;
3393: l_init_msg_list VARCHAR2(1);
3394: l_upg_trx_info_rec ZX_ON_FLY_TRX_UPGRADE_PKG.zx_upg_trx_info_rec_type;
3395: l_lines_det_rec zx_lines_det_factors%rowtype;
3396: BEGIN
3397: IF ( G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) THEN
3398: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN','ZX_API_PUB: '||l_api_name||'()+');
3399: END IF;

Line 3465: | Update zx_lines_det_factors |

3461:
3462:
3463:
3464: /*------------------------------------------------+
3465: | Update zx_lines_det_factors |
3466: +------------------------------------------------*/
3467: IF l_event_class_rec.tax_event_type_code IN ('DELETE','PURGE') THEN
3468: -- Bug 5200373: Incarporated missing hook to take snapshot of zx_lines_det_factors so that
3469: -- upgraded R11i partner softwares can handle the header level document delete

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

3464: /*------------------------------------------------+
3465: | Update zx_lines_det_factors |
3466: +------------------------------------------------*/
3467: IF l_event_class_rec.tax_event_type_code IN ('DELETE','PURGE') THEN
3468: -- Bug 5200373: Incarporated missing hook to take snapshot of zx_lines_det_factors so that
3469: -- upgraded R11i partner softwares can handle the header level document delete
3470: -- sceanrio.
3471: zx_r11i_tax_partner_pkg.copy_trx_line_for_ptnr_bef_upd(NULL
3472: , l_event_class_rec

Line 3496: FROM ZX_LINES_DET_FACTORS

3492: BEGIN
3493: /*Lock trx line det factors for delete*/
3494: SELECT *
3495: INTO l_lines_det_rec
3496: FROM ZX_LINES_DET_FACTORS
3497: WHERE application_id = p_transaction_rec.application_id
3498: AND entity_code = p_transaction_rec.entity_code
3499: AND event_class_code = p_transaction_rec.event_class_code
3500: AND trx_id = p_transaction_rec.trx_id

Line 3523: DELETE from ZX_LINES_DET_FACTORS

3519: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3520: END IF;
3521: END;
3522:
3523: DELETE from ZX_LINES_DET_FACTORS
3524: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID
3525: AND ENTITY_CODE = p_transaction_rec.ENTITY_CODE
3526: AND EVENT_CLASS_CODE = p_transaction_rec.EVENT_CLASS_CODE
3527: AND TRX_ID = p_transaction_rec.TRX_ID;

Line 3530: UPDATE ZX_LINES_DET_FACTORS

3526: AND EVENT_CLASS_CODE = p_transaction_rec.EVENT_CLASS_CODE
3527: AND TRX_ID = p_transaction_rec.TRX_ID;
3528:
3529: ELSIF l_event_class_rec.tax_event_type_code NOT IN ('RELEASE_HOLD') THEN
3530: UPDATE ZX_LINES_DET_FACTORS
3531: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
3532: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
3533: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
3534: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 3558: UPDATE ZX_LINES_DET_FACTORS

3554: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
3555: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3556: END IF;
3557: END IF;
3558: UPDATE ZX_LINES_DET_FACTORS
3559: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
3560: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
3561: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
3562: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 3781: UPDATE ZX_LINES_DET_FACTORS

3777: END;
3778: END IF;
3779:
3780: BEGIN
3781: UPDATE ZX_LINES_DET_FACTORS
3782: SET LINE_LEVEL_ACTION = 'DELETE',
3783: EVENT_TYPE_CODE = nvl(p_transaction_line_rec.event_type_code, l_event_type_code),
3784: TAX_EVENT_TYPE_CODE = 'UPDATE'
3785: WHERE application_id = p_transaction_line_rec.application_id

Line 3933: select ZX_LINES_DET_FACTORS_S.nextval

3929:
3930: /*-----------------------------------------+
3931: | Get the event id for the whole document |
3932: +-----------------------------------------*/
3933: select ZX_LINES_DET_FACTORS_S.nextval
3934: into l_event_class_rec.event_id
3935: from dual;
3936:
3937: /*------------------------------------------------------+

Line 4262: select zx_lines_det_factors_s.nextval

4258:
4259: /*-----------------------------------------+
4260: | Get the event id for the whole document |
4261: +-----------------------------------------*/
4262: select zx_lines_det_factors_s.nextval
4263: into l_event_class_rec.event_id
4264: from dual;
4265:
4266: /*------------------------------------------------------+

Line 4597: select ZX_LINES_DET_FACTORS_S.nextval

4593:
4594: /*-----------------------------------------+
4595: | Get the event id for the whole document |
4596: +-----------------------------------------*/
4597: select ZX_LINES_DET_FACTORS_S.nextval
4598: into l_event_id
4599: from dual;
4600:
4601: /*------------------------------------------------+

Line 4602: | Update zx_lines_det_factors |

4598: into l_event_id
4599: from dual;
4600:
4601: /*------------------------------------------------+
4602: | Update zx_lines_det_factors |
4603: +------------------------------------------------*/
4604:
4605: FOR c_rec in c_event_info loop
4606: IF c_rec.quote_flag <> 'Y' THEN -- Bug 5646787

Line 4607: UPDATE ZX_LINES_DET_FACTORS D

4603: +------------------------------------------------*/
4604:
4605: FOR c_rec in c_event_info loop
4606: IF c_rec.quote_flag <> 'Y' THEN -- Bug 5646787
4607: UPDATE ZX_LINES_DET_FACTORS D
4608: SET EVENT_ID = c_rec.EVENT_ID,
4609: EVENT_TYPE_CODE = c_rec.EVENT_TYPE_CODE,
4610: TAX_EVENT_TYPE_CODE = c_rec.TAX_EVENT_TYPE_CODE,
4611: DOC_EVENT_STATUS = c_rec.DOC_EVENT_STATUS

Line 4818: FROM ZX_LINES_DET_FACTORS

4814: l_related_doc_date,
4815: l_adjusted_doc_date,
4816: l_trx_date,
4817: l_prov_tax_det_date
4818: FROM ZX_LINES_DET_FACTORS
4819: WHERE application_id = l_event_class_rec.application_id
4820: AND entity_code = l_event_class_rec.entity_code
4821: AND event_class_code = l_event_class_rec.event_class_code
4822: AND trx_id = l_event_class_rec.trx_id

Line 4994: | Update zx_lines_det_factors |

4990:
4991: END LOOP;--event_classes cursor
4992:
4993: /*------------------------------------------------+
4994: | Update zx_lines_det_factors |
4995: +------------------------------------------------*/
4996:
4997: IF zx_global_structures_pkg.g_event_class_rec.quote_flag <> 'Y' OR
4998: zx_global_structures_pkg.g_event_class_rec.ICX_SESSION_ID is not null

Line 5024: DELETE from zx_lines_det_factors

5020: | Bug 4948674: Handle delete for P2P products when icx_session_id is NOT NULL |
5021: +------------------------------------------------------------------------------*/
5022:
5023: FORALL i IN l_application_id_tbl.FIRST .. l_application_id_tbl.LAST
5024: DELETE from zx_lines_det_factors
5025: WHERE APPLICATION_ID = l_application_id_tbl(i)
5026: AND ENTITY_CODE = l_entity_code_tbl(i)
5027: AND EVENT_CLASS_CODE = l_event_class_code_tbl(i)
5028: AND TRX_ID = l_trx_id_tbl(i)

Line 5463: select ZX_LINES_DET_FACTORS_S.nextval

5459:
5460: /*-----------------------------------------+
5461: | Get the event id for the whole document |
5462: +-----------------------------------------*/
5463: select ZX_LINES_DET_FACTORS_S.nextval
5464: into l_event_class_rec.event_id
5465: from dual;
5466:
5467: /*------------------------------------------------+

Line 5468: | Update zx_lines_det_factors |

5464: into l_event_class_rec.event_id
5465: from dual;
5466:
5467: /*------------------------------------------------+
5468: | Update zx_lines_det_factors |
5469: +------------------------------------------------*/
5470:
5471: UPDATE ZX_LINES_DET_FACTORS
5472: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,

Line 5471: UPDATE ZX_LINES_DET_FACTORS

5467: /*------------------------------------------------+
5468: | Update zx_lines_det_factors |
5469: +------------------------------------------------*/
5470:
5471: UPDATE ZX_LINES_DET_FACTORS
5472: SET EVENT_TYPE_CODE = l_event_class_rec.event_type_code,
5473: TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
5474: EVENT_ID = l_event_class_rec.event_id,
5475: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code

Line 6154: FROM ZX_LINES_DET_FACTORS

6150: | Retrieve the ledger id to pass to TDS process |
6151: +------------------------------------------------*/
6152: SELECT ledger_id
6153: INTO l_ledger_id
6154: FROM ZX_LINES_DET_FACTORS
6155: WHERE application_id = p_transaction_rec.application_id
6156: AND entity_code = p_transaction_rec.entity_code
6157: AND event_class_code = p_transaction_rec.event_class_code
6158: AND trx_id = p_transaction_rec.trx_id

Line 6183: | Update zx_lines_det_factors for currency info |

6179: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6180: END IF;
6181: END IF;
6182: /*------------------------------------------------+
6183: | Update zx_lines_det_factors for currency info |
6184: +------------------------------------------------*/
6185: UPDATE ZX_LINES_DET_FACTORS SET
6186: CURRENCY_CONVERSION_DATE = p_curr_conv_date,
6187: CURRENCY_CONVERSION_RATE = p_curr_conv_rate,

Line 6185: UPDATE ZX_LINES_DET_FACTORS SET

6181: END IF;
6182: /*------------------------------------------------+
6183: | Update zx_lines_det_factors for currency info |
6184: +------------------------------------------------*/
6185: UPDATE ZX_LINES_DET_FACTORS SET
6186: CURRENCY_CONVERSION_DATE = p_curr_conv_date,
6187: CURRENCY_CONVERSION_RATE = p_curr_conv_rate,
6188: CURRENCY_CONVERSION_TYPE = p_curr_conv_type
6189: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID

Line 6576: | Update zx_lines_det_factors |

6572: END IF;
6573: END IF;
6574:
6575: /*------------------------------------------------+
6576: | Update zx_lines_det_factors |
6577: +------------------------------------------------*/
6578: UPDATE ZX_LINES_DET_FACTORS
6579: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
6580: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code

Line 6578: UPDATE ZX_LINES_DET_FACTORS

6574:
6575: /*------------------------------------------------+
6576: | Update zx_lines_det_factors |
6577: +------------------------------------------------*/
6578: UPDATE ZX_LINES_DET_FACTORS
6579: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
6580: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
6581: WHERE APPLICATION_ID = p_transaction_rec.APPLICATION_ID
6582: AND ENTITY_CODE = p_transaction_rec.ENTITY_CODE

Line 6764: UPDATE ZX_LINES_DET_FACTORS

6760: LIMIT G_LINES_PER_FETCH;
6761:
6762:
6763: FORALL i IN l_application_id_tbl.FIRST .. l_application_id_tbl.LAST
6764: UPDATE ZX_LINES_DET_FACTORS
6765: SET EVENT_TYPE_CODE = l_event_type_code_tbl(i),
6766: TAX_EVENT_TYPE_CODE = l_tax_event_type_code_tbl(i),
6767: DOC_EVENT_STATUS = l_doc_event_status_tbl(i)
6768: WHERE

Line 8644: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

8640: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_LINE_DET_FACTORS';
8641: l_api_version CONSTANT NUMBER := 1.0;
8642: l_return_status VARCHAR2(1);
8643: l_event_class_rec event_class_rec_type;
8644: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
8645: l_line_exists NUMBER;
8646: l_record_exists BOOLEAN;
8647: l_init_msg_list VARCHAR2(1);
8648: l_tax_classification_code VARCHAR2(50);

Line 8774: SELECT ZX_LINES_DET_FACTORS_S.nextval

8770: --Bugfix 4486946 - on-the-fly upgrade end
8771: END IF; --event_type_code
8772:
8773: IF NOT(l_record_exists) THEN
8774: SELECT ZX_LINES_DET_FACTORS_S.nextval
8775: INTO l_event_class_rec.event_id
8776: FROM dual;
8777: END IF;
8778:

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

8840: l_do_defaulting := ZX_SRVC_TYP_PKG.decide_call_redefault_APIs (p_trx_line_index => 1);
8841:
8842: IF l_do_defaulting THEN
8843: /*If the Duplicate Source Document Line identifiers are passed, then derive the values
8844: of the tax determining factors from ZX_LINES_DET_FACTORS for the duplicate source document line.*/
8845: IF p_duplicate_line_rec.application_id is not null THEN
8846: --Default determining factors from Duplicated Line
8847: SELECT
8848: default_taxation_country,

Line 8870: FROM ZX_LINES_DET_FACTORS

8866: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_category(1),
8867: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.assessable_value(1),
8868: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_type(1),
8869: l_tax_classification_code
8870: FROM ZX_LINES_DET_FACTORS
8871: WHERE application_id = p_duplicate_line_rec.application_id
8872: AND entity_code = p_duplicate_line_rec.entity_code
8873: AND event_class_code = p_duplicate_line_rec.event_class_code
8874: AND trx_id = p_duplicate_line_rec.trx_id

Line 8887: ZX_LINES_DET_FACTORS or call TDS defaulting API*/

8883: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.output_tax_classification_code(1) := l_tax_classification_code;
8884: END IF;
8885: /*If the applied from, adjusted, source document information is passed with
8886: the transaction line, then derive the values tax determining factors from
8887: ZX_LINES_DET_FACTORS or call TDS defaulting API*/
8888: ELSE ZX_SRVC_TYP_PKG.default_tax_attrs_wrapper (p_trx_line_index => 1,
8889: p_event_class_rec => l_event_class_rec,
8890: x_return_status => l_return_status
8891: );

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

8995:
8996: /* ============================================================================*
8997: | PROCEDURE insert_line_det_factors : This overloaded procedure will be called|
8998: | by iProcurement to insert all the transaction lines with defaulted tax |
8999: | determining attributes into zx_lines_det_factors after complying with the |
9000: | validation process |
9001: * ============================================================================*/
9002: PROCEDURE insert_line_det_factors (
9003: p_api_version IN NUMBER,

Line 9015: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

9011: l_api_name CONSTANT VARCHAR2(30) := 'INSERT_LINE_DET_FACTORS';
9012: l_api_version CONSTANT NUMBER := 1.0;
9013: l_return_status VARCHAR2(1);
9014: l_event_class_rec event_class_rec_type;
9015: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
9016: l_line_exists NUMBER;
9017: l_record_exists BOOLEAN;
9018: l_init_msg_list VARCHAR2(1);
9019: l_upg_trx_info_rec ZX_ON_FLY_TRX_UPGRADE_PKG.zx_upg_trx_info_rec_type;

Line 9145: SELECT ZX_LINES_DET_FACTORS_S.nextval

9141: | line, the event id needs to be generated from the sequence only for the first transaction|
9142: | line. For other lines, we need to retrieve the event id from the table. |
9143: +-----------------------------------------------------------------------------------------*/
9144: IF NOT(l_record_exists) THEN
9145: SELECT ZX_LINES_DET_FACTORS_S.nextval
9146: INTO l_event_class_rec.event_id
9147: FROM dual;
9148: END IF;
9149:

Line 9546: FROM zx_lines_det_factors

9542: l_incomplete_scenario := 0;
9543: BEGIN
9544: SELECT 1
9545: INTO l_incomplete_scenario
9546: FROM zx_lines_det_factors
9547: WHERE event_class_code = p_hdr_det_factors_rec.event_class_code
9548: AND application_id = p_hdr_det_factors_rec.application_id
9549: AND entity_code = p_hdr_det_factors_rec.entity_code
9550: AND trx_id = p_hdr_det_factors_rec.trx_id

Line 9582: UPDATE ZX_LINES_DET_FACTORS

9578: ' Incorrect event information passed in for event type :' ||p_hdr_det_factors_rec.event_type_code ||' Please Check!');
9579: END IF;
9580: END;
9581: BEGIN
9582: UPDATE ZX_LINES_DET_FACTORS
9583: SET TAX_EVENT_TYPE_CODE = l_event_class_rec.tax_event_type_code,
9584: DOC_EVENT_STATUS = l_event_class_rec.doc_status_code
9585: WHERE APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID
9586: AND ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE

Line 10318: UPDATE ZX_LINES_DET_FACTORS SET

10314:
10315: /*-----------------------------------------------+
10316: |Update the headers only in zx_line_det_factors |
10317: +----------------------------------------------*/
10318: UPDATE ZX_LINES_DET_FACTORS SET
10319: APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID,
10320: ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE,
10321: EVENT_CLASS_CODE = p_hdr_det_factors_rec.EVENT_CLASS_CODE,
10322: EVENT_TYPE_CODE = p_hdr_det_factors_rec.EVENT_TYPE_CODE,

Line 10657: UPDATE ZX_LINES_DET_FACTORS SET

10653:
10654: /*-----------------------------------------------+
10655: |Update the headers only in zx_line_det_factors |
10656: +----------------------------------------------*/
10657: UPDATE ZX_LINES_DET_FACTORS SET
10658: APPLICATION_ID = p_hdr_det_factors_rec.APPLICATION_ID,
10659: ENTITY_CODE = p_hdr_det_factors_rec.ENTITY_CODE,
10660: EVENT_CLASS_CODE = p_hdr_det_factors_rec.EVENT_CLASS_CODE,
10661: EVENT_TYPE_CODE = p_hdr_det_factors_rec.EVENT_TYPE_CODE,

Line 11153: FROM ZX_LINES_DET_FACTORS

11149: SELECT event_id,
11150: nvl(user_upd_det_factors_flag,'N')
11151: INTO l_event_class_rec.event_id,
11152: l_user_updated_flag
11153: FROM ZX_LINES_DET_FACTORS
11154: WHERE application_id = l_event_class_rec.application_id
11155: AND entity_code = l_event_class_rec.entity_code
11156: AND event_class_code = l_event_class_rec.event_class_code
11157: AND trx_id = l_event_class_rec.trx_id

Line 11186: FROM ZX_LINES_DET_FACTORS

11182: SELECT event_id,
11183: nvl(user_upd_det_factors_flag,'N')
11184: INTO l_event_class_rec.event_id,
11185: l_user_updated_flag
11186: FROM ZX_LINES_DET_FACTORS
11187: WHERE application_id = l_event_class_rec.application_id
11188: AND entity_code = l_event_class_rec.entity_code
11189: AND event_class_code = l_event_class_rec.event_class_code
11190: AND trx_id = l_event_class_rec.trx_id

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

11355: END update_line_det_factors;
11356:
11357: /* ============================================================================*
11358: | PROCEDURE copy_insert_line_det_factors : This procedure will be called |
11359: | by iProcurement to insert all the transaction lines into zx_lines_det_factors|
11360: | after copying the tax determining attributes from the source document |
11361: | information passed in. All lines thus inserted will be flagged to be picked |
11362: | up by the tax calculation process |
11363: * ============================================================================*/

Line 11378: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;

11374: l_api_name CONSTANT VARCHAR2(30) := 'COPY_INSERT_LINE_DET_FACTORS';
11375: l_api_version CONSTANT NUMBER := 1.0;
11376: l_return_status VARCHAR2(1);
11377: l_event_class_rec event_class_rec_type;
11378: l_line_det_rec ZX_LINES_DET_FACTORS%rowtype;
11379: l_line_exists NUMBER;
11380: l_record_exists BOOLEAN;
11381: l_init_msg_list VARCHAR2(1);
11382: l_tax_classification_code VARCHAR2(50);

Line 11477: SELECT zx_lines_det_factors_s.nextval

11473: END LOOP;
11474:
11475:
11476: IF NOT(l_record_exists) THEN
11477: SELECT zx_lines_det_factors_s.nextval
11478: INTO l_event_class_rec.event_id
11479: FROM dual;
11480: END IF;
11481:

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

11531: /* =============================================*
11532: |Default the tax determining attributes |
11533: * ============================================*/
11534: /*If the Source Document Line identifiers are passed, then derive the values
11535: of the tax determining factors from ZX_LINES_DET_FACTORS for the source document line.*/
11536: FOR i in 1 .. nvl(ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.application_id.LAST,-99)
11537: LOOP
11538: SELECT
11539: default_taxation_country,

Line 11561: FROM ZX_LINES_DET_FACTORS

11557: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_category(i),
11558: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.assessable_value(i),
11559: ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.product_type(i),
11560: l_tax_classification_code
11561: FROM ZX_LINES_DET_FACTORS
11562: WHERE application_id = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_application_id(i)
11563: AND entity_code = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_entity_code(i)
11564: AND event_class_code = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_event_class_code(i)
11565: AND trx_id = ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl.source_trx_id(i)

Line 11888: DELETE from ZX_LINES_DET_FACTORS

11884: /*-----------------------------------------+
11885: | Delete transaction line |
11886: +-----------------------------------------*/
11887:
11888: DELETE from ZX_LINES_DET_FACTORS
11889: WHERE application_id = p_transaction_line_rec.application_id
11890: AND entity_code = p_transaction_line_rec.entity_code
11891: AND event_class_code = p_transaction_line_rec.event_class_code
11892: AND trx_id = p_transaction_line_rec.trx_id

Line 12151: -- Fetch all attributes from zx_lines_det_factors

12147: -- For records in trx_line_dist_tbl
12148: -- Loop
12149: -- If line_level_action is UPDATE
12150: -- If all tax determining attributes are passed null
12151: -- Fetch all attributes from zx_lines_det_factors
12152: -- if item/item_org_id/country has changed
12153: -- call RE-defaulting API for intended_use, product_fiscal_classification
12154: -- if item/item_org_id/assessable value has changed
12155: -- call redefaulting API for assessable value

Line 13519: FROM ZX_LINES_DET_FACTORS lines

13515: END IF;
13516: END IF; --tax recovery is Y
13517:
13518: DELETE
13519: FROM ZX_LINES_DET_FACTORS lines
13520: WHERE (APPLICATION_ID, ENTITY_CODE,EVENT_CLASS_CODE, TRX_ID)
13521: IN (SELECT /*+ INDEX (ZX_PURGE_TRANSACTIONS_GT ZX_PURGE_TRANSACTIONS_GT_U1)*/
13522: APPLICATION_ID,
13523: ENTITY_CODE,

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

13528: IF SQL%FOUND THEN
13529: l_row_count := SQL%ROWCOUNT;
13530: IF (G_LEVEL_PROCEDURE >= g_current_runtime_level ) THEN
13531: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name ,
13532: 'Number of rows deleted from ZX_LINES_DET_FACTORS = '||to_char(l_row_count));
13533: END IF;
13534: END IF;
13535: --ELSIF tax_reporting_flag = 'Y' --AR/AP cases wherein we need to purge only if tax lines are frozen --TBD on requirement basis
13536: END IF; --tax reporting flag is N