[Home] [Help]
326: txl.kle_id,
327: txd.target_kle_id,
328: txd.quantity,
329: txl.current_units
330: FROM okl_txd_assets_b txd,
331: okl_txl_Assets_b txl
332: WHERE txl.tal_type = 'ALI'
333: AND txd.tal_id = txl.id
334: AND txl.id = p_trxline_id
3419:
3420: --check for asset on an split asset transaction
3421: CURSOR asset_chk_curs3 (p_asset_number IN VARCHAR2) IS
3422: SELECT 'Y'
3423: FROM okl_txd_assets_b txd
3424: WHERE NVL(txd.asset_number,'-999999999999999') = p_asset_number
3425: AND EXISTS (SELECT NULL
3426: FROM okl_trx_Assets trx,
3427: okl_trx_types_tl ttyp,
3506:
3507: --check for asset on an split asset transaction
3508: CURSOR asset_chk_curs3 (p_asset_number IN VARCHAR2, p_txdv_id IN NUMBER) IS
3509: SELECT 'Y'
3510: FROM okl_txd_assets_b txd,
3511: okl_txl_assets_b txl,
3512: okl_trx_types_tl ttyp,
3513: okl_trx_assets trx
3514: WHERE NVL(txd.asset_number,'-999999999999999') = p_asset_number
3929: x_msg_data,
3930: '_PVT');
3931: END Update_trx_header;
3932: --------------------------------------------------------------------------------
3933: --Procedure to create split transaction details (okl_txd_assets_b)
3934: --Bug# 2798006 : Modifications for Loan contract - instead of reading values from
3935: --p_ast_line_rec will read from p_txlv_rec
3936: --------------------------------------------------------------------------------
3937: PROCEDURE Create_trx_details(p_api_version IN NUMBER,
4663: FROM mtl_parameters mp,
4664: okc_k_headers_b chrb,
4665: okc_k_lines_b cleb,
4666: okl_txl_Assets_b txlb,
4667: okl_txd_assets_b txdb
4668: WHERE mp.organization_id = chrb.inv_organization_id
4669: AND chrb.id = cleb.dnz_chr_id
4670: AND cleb.id = txlb.kle_id
4671: AND txlb.id = p_tal_id
4672: AND txdb.id = p_asd_id;
4673:
4674: l_mast_org_id mtl_parameters.master_organization_id%TYPE;
4675: l_inv_org_id okc_k_headers_b.inv_organization_id%TYPE;
4676: l_inv_item_id okl_txd_assets_b.inventory_item_id%TYPE;
4677:
4678: --Cursor to get location of parent instance from IB
4679: CURSOR ib_loc_csr (p_tal_id IN NUMBER) IS
4680: SELECT txlb.kle_id fa_cle_id,
4768:
4769: --Bug # 7047938
4770: cursor l_tal_csr (p_asd_id in number) is
4771: select tal_id
4772: from okl_txd_assets_b
4773: where id = p_asd_id;
4774:
4775: l_tal_id okl_txd_assets_b.tal_id%TYPE;
4776: --Bug 7047938 End
4771: select tal_id
4772: from okl_txd_assets_b
4773: where id = p_asd_id;
4774:
4775: l_tal_id okl_txd_assets_b.tal_id%TYPE;
4776: --Bug 7047938 End
4777: BEGIN
4778: ----
4779: x_return_status := OKL_API.START_ACTIVITY (
7756: cle.cle_id cle_id,
7757: target_cle.cle_id target_cle_id,
7758: txd.quantity,
7759: txl.current_units
7760: FROM okl_txd_assets_b txd,
7761: okl_txl_Assets_b txl,
7762: okc_k_lines_b cle,
7763: okc_k_lines_b target_cle
7764: WHERE txl.tal_type = 'ALI'
7783: cle.cle_id cle_id,
7784: target_cle.cle_id target_cle_id,
7785: txd.quantity,
7786: txl.current_units
7787: FROM okl_txd_assets_b txd,
7788: okl_txl_Assets_b txl,
7789: okc_k_lines_b cle,
7790: okc_k_lines_b target_cle
7791: WHERE txl.tal_type = 'ALI'
7979: cle.cle_id cle_id,
7980: target_cle.cle_id target_cle_id,
7981: txd.quantity,
7982: txl.current_units
7983: FROM okl_txd_assets_b txd,
7984: okl_txl_Assets_b txl,
7985: okc_k_lines_b cle,
7986: okc_k_lines_b target_cle
7987: WHERE txl.tal_type = 'ALI'
8976: p_cle_id IN NUMBER) IS
8977: SELECT id,
8978: quantity,
8979: split_percent
8980: FROM okl_txd_assets_b txd
8981: WHERE txd.tal_id = p_tal_id
8982: AND NVL(txd.target_kle_id,-1) <> p_cle_id;
8983:
8984: l_sll_amount NUMBER;
10718: Cursor tax_off_trx_amt(p_asset_id in number, p_tax_book in varchar2) is
10719: select tas.date_trans_occurred
10720: FROM OKL_TRX_ASSETS tas,
10721: OKL_TXL_ASSETS_B tal,
10722: OKL_TXD_ASSETS_B txl
10723: WHERE tas.id = tal.tas_id
10724: AND tal.id = txl.tal_id
10725: AND txl.tax_book = p_tax_book
10726: AND tas.tsu_code = 'PROCESSED'
10730: SELECT
10731: tas.date_trans_occurred
10732: FROM OKL_TRX_ASSETS tas,
10733: OKL_TXL_ASSETS_B tal,
10734: OKL_TXD_ASSETS_B txd
10735: WHERE tas.id = tal.tas_id
10736: AND tal.corporate_book = P_corp_book
10737: AND tas.tsu_code = 'PROCESSED'
10738: AND tas.tas_type in ('AMT')
10742: Cursor tax_off_trx_aus(p_asset_id in number, p_tax_book in varchar2) is
10743: select tas.date_trans_occurred
10744: FROM OKL_TRX_ASSETS tas,
10745: OKL_TXL_ASSETS_B tal,
10746: OKL_TXD_ASSETS_B txl
10747: WHERE tas.id = tal.tas_id
10748: AND tal.id = txl.tal_id
10749: AND txl.tax_book = p_tax_book
10750: AND tas.tsu_code = 'PROCESSED'
10754: SELECT
10755: tas.date_trans_occurred
10756: FROM OKL_TRX_ASSETS tas,
10757: OKL_TXL_ASSETS_B tal,
10758: OKL_TXD_ASSETS_B txd
10759: WHERE tas.id = tal.tas_id
10760: AND tal.corporate_book = P_corp_book
10761: AND tas.tsu_code = 'PROCESSED'
10762: AND tas.tas_type in ('AUS')
10944: -- p_sla_source_try_id IN Number,
10945: -- OKL_TRX_ASSETS.try_id (transaction type id)
10946: -- p_sla_source_line_id IN Number,
10947: -- ID of line table (OKL_TXL_ASSETS_B or
10948: -- OKL_TXD_ASSETS_B
10949: -- p_sla_source_line_table IN Varchar2,
10950: -- OKL_TXL_ASSETS_B or OKL_TXD_ASSETS_B
10951: -- p_sla_source_chr_id IN Number,
10952: -- Contract id of the contract on which
10946: -- p_sla_source_line_id IN Number,
10947: -- ID of line table (OKL_TXL_ASSETS_B or
10948: -- OKL_TXD_ASSETS_B
10949: -- p_sla_source_line_table IN Varchar2,
10950: -- OKL_TXL_ASSETS_B or OKL_TXD_ASSETS_B
10951: -- p_sla_source_chr_id IN Number,
10952: -- Contract id of the contract on which
10953: -- source transaction happened
10954: -- p_sla_source_kle_id IN Number,
14041: okc_line_styles_b lse_ib,
14042: okc_k_lines_b cle_inst,
14043: okc_line_styles_b lse_inst,
14044: okc_k_lines_b cle_fa,
14045: okl_txd_assets_b txdb
14046: WHERE cle_ib.lse_id = lse_ib.id
14047: AND lse_ib.lty_code = 'INST_ITEM'
14048: AND cle_ib.dnz_chr_id = cle_inst.dnz_chr_id
14049: AND cle_ib.cle_id = cle_inst.id
14060: --cursor to fetch child asset top line is
14061: CURSOR child_cle_csr(p_txd_id IN NUMBER) IS
14062: SELECT cle_fa.cle_id
14063: FROM okc_k_lines_b cle_fa,
14064: okl_txd_assets_b txdb
14065: WHERE cle_fa.id = txdb.target_kle_id
14066: AND txdb.id = p_txd_id;
14067:
14068: l_target_cle_id OKC_K_LINES_B.ID%TYPE;
14322:
14323: --cursor to fetch child instance lines
14324: CURSOR l_target_kle_csr(p_tal_id IN NUMBER) IS
14325: SELECT txdb.target_kle_id
14326: FROM okl_txd_assets_b txdb
14327: WHERE txdb.tal_id = p_tal_id;
14328:
14329: l_target_kle_id NUMBER DEFAULT 0;
14330:
14668: cle_id
14669: FROM okc_k_items cim
14670: WHERE EXISTS
14671: (SELECT '1'
14672: FROM okl_txd_assets_b txd
14673: WHERE txd.target_kle_id = cim.cle_id
14674: AND txd.id = p_id
14675: );
14676:
14788: OKC_LINE_STYLES_B inst_item_lse,
14789: OKC_K_LINES_B f_frm2,
14790: OKC_LINE_STYLES_B f_frm2_lse,
14791: OKC_K_LINES_B fa,
14792: OKL_TXD_ASSETS_B asd
14793: WHERE cim.cle_id = inst_item.id
14794: AND cim.dnz_chr_id = inst_item.dnz_chr_id
14795: AND inst_item.cle_id = f_frm2.id
14796: AND inst_item.lse_id = inst_item_lse.id
15365: p_sla_source_header_id => l_txlv_rec.tas_id,
15366: p_sla_source_header_table => 'OKL_TRX_ASSETS',
15367: p_sla_source_try_id => l_trx_rec.try_id,
15368: p_sla_source_line_id => l_txdv_rec.id,
15369: p_sla_source_line_table => 'OKL_TXD_ASSETS_B',
15370: p_sla_source_chr_id => l_chr_id,
15371: p_sla_source_kle_id => l_split_cle_id,
15372: p_sla_asset_chr_id => l_sla_asset_chr_id,
15373: --Bug# 6373605--SLA populate sources